Symptom
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.
Cause
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.
Resolution
To resolve the behavior
-
Obtain the last record from the database.
-
Customize the toolbar by adding a command button to go to the last record.
-
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)
{
CrystalReportViewer.ShowNthPage(Convert.ToInt32(totalPages));
}
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
Keywords
Active X, ShowLastPage, 65535, pages , 9480806 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed