Refreshing Report Datasource on PostBack

4 posts, 0 answers
  1. Glenn Boothe
    Glenn Boothe avatar
    21 posts
    Member since:
    Jul 2008

    Posted 18 Sep 2009 Link to this post

    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.




  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Sep 2009 Link to this post

    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.
  3. DevCraft banner
  4. david terek
    david terek avatar
    10 posts
    Member since:
    Apr 2008

    Posted 28 Sep 2009 Link to this post

    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
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 29 Sep 2009 Link to this post

    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.
Back to Top