SAP Knowledge Base Article - Public

1206835 - The Active X viewer only goes to page 65,535 when clicking Go to Last Page


In Crystal Reports XI and Crystal Reports 10, when viewing a report with more than 65,535 pages in the Crystal Reports Active X Viewer, if the user clicks the Go to Last Page button, page 65,535 is displayed instead of the true last page.


This behavior occurs because the Go to Last Page button and ShowLastPage method of the SDK for Crystal Reports has a maximum limitation of 65,535 pages.


To resolve the behavior

  1. Obtain the last record from the database.
  2. Customize the toolbar by adding a command button to go to the last record.
  3. Use the Crystal Report Viewer ShowNthPage method instead of ShowLastPage.

For example, use the following code:

// get the records count directly from the database using a stored procedure

totalPages = getTotalPages();

Protected void cmdLastRecord_Click(object sender, EventArgs e)
<!--[if !supportLineBreakNewLine]-->


Active X, ShowLastPage, 65535, pages , 9480806 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed


SAP Crystal Reports XI ; SAP Crystal Reports XI R2 ; SAP Crystal Reports, version for Visual Studio .NET 2005 ; SAP Crystal Reports, version for Visual Studio .NET 2008 ; SAP Crystal Reports, version for Visual Studio .NET 9.1