Page navigation in own preview window
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
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
This discussion has been closed.
Comments
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/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com