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

Passing Parameters - breaks on the server

5 Answers 155 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
TPerry
Top achievements
Rank 1
TPerry asked on 16 Apr 2009, 06:52 PM
After struggling with passing in parameters for several days, I finally got it to work perfectly when on my local machine.  However, when I deploy it to the server, it doesn't seem to passing the parameter correctly.  No data appears in the report.  This is how I'm passing in the parameter from my aspx page.  (SummaryReport is the name of my Report.)  Is there a reason that this would work locally, but not on the server?  Help, I'm so frustrated!

 

Dim RID As Integer

 

RID = Request.QueryString("RID")

 

 

 

Dim Report As Telerik.Reporting.Report

 

 

Report =

New SummaryReport

 

 

Report.ReportParameters(0).Value = RID

 

Me.ReportViewer1.Report = Report

5 Answers, 1 is accepted

Sort by
0
TPerry
Top achievements
Rank 1
answered on 17 Apr 2009, 03:20 PM
OK, after more head scratching, I have figured out that it isn't even the parameters that is causing the problem, I'm not even connecting to the data at all. I removed the code I used below and just want to display the default data.  In the parameters, I have a default value for the RID = 1 and it isn't even pulling that in.  At this point, I'm guessing that the problem is within the connection string.  I looked in my app.config file of my Reports project and the connection string in there matches exactly the connection string in my web.config file in my web project.  The report works fine when I run it locally, connecting to the live SQL server.  However, when I publish it to the web server, still trying to connect to the same live SQL server, the report just loads the 'Generating Report' image.  My table adapters were all created using the wizard.  Any thoughts?
0
Accepted
Steve
Telerik team
answered on 17 Apr 2009, 04:02 PM
Hi TPerry,

Indeed the connectionString is most probably at the bottom of the problem. You said that you've checked your app.config file for the connectionString, but since you've created the table adapters with the report wizard, they would contain the initial connectionString from your local computer. Are you changing the connectionString at runtime or have you replaced it in your table adapters manually?
Here is a code library that shows you how to change the connectionString, so that the one from the app.config is used instead: Use the connectionString from your app's config file.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
TPerry
Top achievements
Rank 1
answered on 21 Apr 2009, 07:21 PM
That was exactly it!  Thanks for your help!
0
John
Top achievements
Rank 1
answered on 23 Jun 2009, 10:18 AM
can i ask a copy of your code used in passing the data from other page with Request.QueryString?

thnx
0
Steve
Telerik team
answered on 23 Jun 2009, 11:09 AM
Hello John,

We've answered your inquiry in the other thread you've opened.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
TPerry
Top achievements
Rank 1
Answers by
TPerry
Top achievements
Rank 1
Steve
Telerik team
John
Top achievements
Rank 1
Share this question
or