This is a migrated thread and some comments may be shown as answers.

Cant see data on shared web server

2 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jupiter
Top achievements
Rank 1
Jupiter asked on 23 Feb 2011, 04:42 PM
Locally data can be seen, but when uploaded to whared web server, report dosent show any record. Here is the code


<%

@ Register assembly="Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>

 

 <%

@ Import Namespace="System.Collections.Generic" %>

 

 <%

@ Import Namespace="System.Data" %>

 

 <%

@ Import Namespace="System.Data.sqlClient" %>

 

 <%

@ Import Namespace="Telerik.Reporting" %>

 

 <%

@ Import Namespace="Telerik.ReportViewer.WebForms" %>

 

 <%

@ Import Namespace="UnityTelerik" %>

 

 

page load code:

Con.Close()

Con.Open()

 

Dim dts As New  DataSet

 

 

da =

New SqlDataAdapter("select * from purchase order by lot_no", Con)

 

 da.Fill(dts,

"purchase")

 

  

 

Dim objectDataSource As New

Telerik.Reporting.ObjectDataSource()

 objectDataSource.DataSource = dts.Tables(0)

  

 

Dim c As New Report1

 c.DataSource = objectDataSource

 

ReportViewer1.Report = c

 ReportViewer1.RefreshReport()

 


Please advice me. to see my uploaded page visit telerik.mallikasoft.com


2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 25 Feb 2011, 01:26 PM
Hello Jupiter,

The code provided looks correct and the fact it does not work on the web server only means that most likely the connectionString is not correct.

Regards,
Steve
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jupiter
Top achievements
Rank 1
answered on 28 Feb 2011, 12:36 PM

Hi Steve,

 

Thank you. I really appreciate your help to find out the reason. i had to modify connection string in web config file.

Tags
General Discussions
Asked by
Jupiter
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jupiter
Top achievements
Rank 1
Share this question
or