on 08-03-2008 5:38 AM
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Obviously if I show the last page, I can get the count.
I want to know the count before doing any paging!
I rewrote the app to do this in the app prior to calling Crystal, so this is not really an issue. However, since my users modify their forms and potentially change the number of lines per page, it may be a problem downstream.
It just seems that the Viewer is VERY limited in giving a developer the info they need to work with it.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.