Skip to Content
author's profile photo Former Member
Former Member

Knowing Viewer Page Count in Windows Forms

How do I determine the total Page Count of the Document in the Viewer?

Due to performance problems, I am breaking my report into 'Groups'. My Selection Formula is selecting the records for the group. I have created my own toolbar to move from page to page, but I don't know how many pages are in a group. Therefore, somehow I need to get the info from the viewer.

Say my group has 10 pages. I capture the CRViewer.Navigate event and see as I page through the NewPageNumber cycles through until is goes to 11, which is beyond my page count. The ShowNextPage event acts as if nothing is wrong, and shows me page 10 again!

I've looked through all the help files and only find a way to do this via the Web Viewer, which doesn't do me much good!

Suggestions please!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2008 at 10:35 AM

    Hello Steven,

    what happens if you use the ShowLastPage() method ?

    [Visual Basic] 
    myCrystalReportViewer.ShowLastPage() 
    [C#] 
    crystalReportViewer.ShowLastPage() ;

    If it will not display the page 11 then I would doublecheck how many pages this report displays in the CR Designer.

    Falk

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.