Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Page navigation in own preview window

edited June 2004 in General
Hello
I was made my own preview window using ppViewer and i created label that
showing current page number and pages count.
But pages count value is incorrect.
For example:
-- preview window showed at first time (pages count 3)
label showing: 1 of 1;
-- going to next page (ppViewer.NextPage)
label showing: 2 of 2;
-- returing to previous page
label showing 1 of 2;

i use TppCustomReport(ppViewer.Report).PageCount what is incorrect?

How can i get pages count when preview window showed at first time?


Sergey Kolokolov

Comments

  • edited June 2004
    Hi Sergey,

    You need to set the Report.PassSetting to psTwoPass. This way ReportBuilder
    will determine the total amount of pages before it is previewed. This
    property is published so you can access it from the Object Inspector in
    Delphi.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.