views:

476

answers:

2

Hi,

I'm having a problem with the Visual Studio 2010 RC Webforms ReportViewer. It shows the report ok when I am loading the page, but when clicking on "Next Page" or entering a page number, it just loads and displays the first page all over again.

I have verified using Firebug that the request initiated by the paging button is actually sucessful and that it really is the first page of the report that is returned by the report server.

When looking at the report in the ReportsManager, paging works as expected, so this seems to be a viewer issue.

Has anyone else seen this problem? Any suggestions on how to fix or work around this would be greatly appreciated.

Thanks,

Adrian

+1  A: 

Very likely something in your page is causing the report viewer to be reconstructed on each postback or causing the report to be executed again. Therefore, no matter what triggers the postback, you get page 1.

If the answer is not apparent based on this answer, please supply the code you use to run the report and give it report parameters.

Jerry Bullard
A: 

I'd suspect that Jerry is right. If AsyncRendering=true then the ReportViewer causes a lot of partial postbacks. If you're not checking for this (!isPostBack) then every time it does this it may be running code to reset the viewer.

Here is a more in depth explanation. The result is different, but I'm wondering if mechanism causing the problem is the same: http://blogs.msdn.com/b/brianhartman/archive/2010/03/21/reports-never-stop-loading-with-vs-2010.aspx

Joel