cancel
Showing results for 
Search instead for 
Did you mean: 

New Parameter, Old Data

Former Member
0 Kudos

I generate a report from a web page based on a value in a list. The first time the report is run, the data is correct, all following times, the data does not change from the first time.

I run the program in the debugger, to make sure that the value from the list is being parameter to the report is being passed, and it is.

When I display the parameter on the report, it shows the old value.

Language VB

Visual Studio 2010

Windows XP

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

Not much info but try adding the Report.Refresh to the viewer code or after you have set up all of the changes.

Thank you

Don

Former Member
0 Kudos

As I was looking for solutions I found that suggestion and had already tried it. I tried it again.

Adding:

crViewer.RefreshReport()

Results in:

Error

Missing parameter values.

I have been messing with this for a couple hours, and the only way I can get it to display the proper data is to redirect away to another page that does nothing but redirect back the report page. It is kind of a ridiculous solution, but maybe another clue as to why it is doing it.

0 Kudos

try to disable caching on your web page:

Response.CacheControl = "no-cache"
Response.AddHeader ("Pragma", "no-cache")
Response.Expires = -1

Edited by: Paul Doe on Mar 2, 2011 12:44 AM

Former Member
0 Kudos

Is the non-postback portion of the page load the proper place?

If Not IsPostBack Then

Response.CacheControl = "no-cache"

Response.AddHeader("Pragma", "no-cache")

Response.Expires = -1

.

.

.

It did not solve the problem.

Thanks for the suggestion.

Answers (0)