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

Refreshing Report Datasource on PostBack

3 Answers 177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Glenn Boothe
Top achievements
Rank 1
Glenn Boothe asked on 18 Sep 2009, 06:13 PM
Hello,

I am having a problem with my Telerik Report using Datasource on Postback even when I explicitly create and bind a new Datasource to the report in the code behind.

I have a Dropdownlist on my page that contains date ranges I can select to populate the report with.  Next to that I have a "Get Report" button that when clicked fetches the necessary rows from the database, processes them, manually builds a Dataset, and then binds the Dataset to the report.

This works great the first time I generate the report after visiting the page.  However, when I select a new date range from the dropdown and click the Get Timesheet button, the same data from before is displayed.  The Report or ReportViewer appears to be using cached data and I do not know how to refresh it.  The documentation shows a public RefreshReport method in the ReportViewer class that does not actually show up in Visual Studio for me.  Even when I click the refresh button on the ReportViewer, the data remains the same.  I realize that I am not using the standard method to set report parameters, but due to the way I have to build the DataSet I am unable to set the parameters directly on the report.

Any help is greatly appreciated.




3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 22 Sep 2009, 09:24 AM
Hello Glenn,

Your question has already been answered in the other thread you've opened. Please, see our answer there for more information.
We kindly ask you to use just one support channel to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two tickets instead of one. Moreover threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
david terek
Top achievements
Rank 1
answered on 28 Sep 2009, 09:43 PM
Hey there Steve,
it would have been nice if you could have posted a link to his other question, as I have the same problem, and now have to search all over for this other post, or repost myself.
Thanks, John
0
Steve
Telerik team
answered on 29 Sep 2009, 07:21 AM
Hello David,

It is a support ticket and cannot be referenced in the forums. Anyway here is the reply:

The RefreshReport() method is introduced in the Q2 SP1 release and is due to changes how the report viewer handles the report. The problem you describe sounds like an issue that existed in the Q1 release and which is addressed in the subsequent service pack. Verify if this is the case by setting EnableViewState property of the report viewer to false and if it starts working correctly, then you can go ahead and upgrade to the latest version after checking our release notes.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Glenn Boothe
Top achievements
Rank 1
Answers by
Steve
Telerik team
david terek
Top achievements
Rank 1
Share this question
or