cancel
Showing results for 
Search instead for 
Did you mean: 

"Next Page" wont go beyond page 2 in Html Viewer (Crystal.NET for VS 2008)

Former Member
0 Kudos

I have some reports, originally created using the Crystal Reports for .NET bundled with Visual Studio 2005 and the .NET 2.0 framework. We've recently moved to Visual Studio 2008 and the .NET 3.5 framework.

Reports displayed in the Html Viewer do not paginate properly using the Next Page button on the toolbar. Specifically, going from page 1 to page 2 works, but the "next" button does not go beyond page 2.

It is possible to navigate to a specific page beyond page 2 using the page number input field. At that point, the "next" button takes me back to page 2, and the "previous" button takes me back to page 1.

The "last" and "first" button correctly navigates to the last and first page respectively.

Anyone seen anything like this? Ideas on correcting this problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Allan,

Please open the crystal reports in Visual studio 2008 and save the reports.

This will update the crystal reports to the CR Basic for VS 2008 automatically.

If you are upgrading the application please make sure you have proper references for CR 10.5(CR Basic for VS 2008 ).

Thanks,

Prasad Kanchan

Former Member
0 Kudos

I have tried opening and saving the reports. The behavior did not change.

All CrystalDecisions assembly references are for the 10.5 versions.

Former Member
0 Kudos

I had the exact same problem. If you bind your report's datasource in the page_load, try doing it in the page_init instead.

Former Member
0 Kudos

Alain,

Thank you, moving my code from the Load event to the Init fixed the problem.

Allan

Former Member
0 Kudos

Hi,

When you click on next button then load evnt is fired.

When load event is fired then your code executed again and again which causes the issue, to prevent that you can put your code in the "IsPostBack" property so that the code get executed once, regardless the number of times next button pressed.

Hope that helps

Regards,

Amit

Answers (4)

Answers (4)

Former Member
0 Kudos

If i have a single static report, then the Page Init methods works fine.

But If am loading different reports based on user selection from a Tree view, how to handle the report load in page init then.

If i follow the normal process of loading the report (reportdocument.load) on tree view selectionchanged event, then i run into the problem of report navigation not moving beyond page 2.

Anybody tried this or has an idea how to get around this.

Regards

Nitin

Former Member
0 Kudos

Here we are almost 5 years later, and this saved my ass.  None of the multipage reports allowed going to page 2 using Next Page.  Then I simply renamed Page_Load to Page_Init, and everything works like a charm.

Thanks.

--Dan

0 Kudos

I have the same problem with Crystal Reports for Visual Studio 2010.

If I initialize my report in Page_Init it works fine.

Thanks,

Eva Janakieff

Former Member
0 Kudos

Hi,

It might be possible that session are in use, if this is the case then have you used the IsPostBack property to call your report again and again.

Hope that help

Regards,

Amit.

Former Member
0 Kudos

We did see that with older versions of the component bundled in VS2002/2003... one cause of the issue had to do with the order of page events. In which event is your code to load the report being called? Also, how are you persisting/retrieving your report object?

Former Member
0 Kudos

The report document is being retrieved in the page load event, if it is a postback we are getting the persisted object from session state. On page unload we persist the report document into session state.

Everything was working properly until the framework 3.5 update. Is there any problem with the 10.5 Crystal and .NET 3.5?