locked
Retrieving current page number and total pages from Crystal Report RRS feed

  • Question

  • User-1866386614 posted

    Hi,

    Because the page navigation buttons of Crystal Report Viewer for VS 2005 is really bad (if I press the button to retrieve the last page, unless I keep my mouse over the button it won't process the request!!) I've had to create my own navigation buttons.  I have been able to do this successfully, but now I want to be able to show the user the number of pages in the crystal report and the current page number that they are on.  Similar to:

    You are viewing page 10 of 299 

    Is there any way of being able to do this??  I can't seem to find a way of extracting this information out of the either the CrystalReportViewer or from the ReportDocument.

    Wednesday, February 21, 2007 11:48 PM

Answers

  • User-1866386614 posted

    I was able to do this by accessing the relevant properties from the CrystalReportViewers ViewInfo object, as below:

    CrystalDecisions.Web.ViewInfo vi = crViewer.ViewInfo;

    pagenum.Text = vi.PageNumber + " of " + vi.LastPageNumber;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 22, 2007 12:29 AM

All replies

  • User-1866386614 posted

    I was able to do this by accessing the relevant properties from the CrystalReportViewers ViewInfo object, as below:

    CrystalDecisions.Web.ViewInfo vi = crViewer.ViewInfo;

    pagenum.Text = vi.PageNumber + " of " + vi.LastPageNumber;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 22, 2007 12:29 AM
  • User1933630939 posted

    not Working.

    Monday, June 1, 2009 4:45 AM
  • User-1926462429 posted

    hi ,

      It is possible to show both Current Page and Total No of page in Crystal Report Page Header. usuallly it shows 1/1+ .

    To show Current page / Total No of page: Go To Your Solution Field Explorer->Special Fields From here Drag "Page N of M" To you Crystal Report.

    That's it. It will work for u. No need to do any extra coding for it.

    Regards

    Gireesh

    Tuesday, September 27, 2011 5:05 AM