Pagecount in a viewer
Hi all,
I have a Viewer form like in Your demos, where the page number and page
count is shown in an editmask field.
The Viewer is beeing used for both reports and archive files. Since
PageCount is a property from the report / archive, I need to do a test in
order to decide wich one I'm using to get the PageCount.
Something like
if ppViewer.producer = TppCustomArchiveReader then
EditMask.text :=
IntToStr(TppArchiveReader(ppViewer.Report).ArchivePageCount)
else
EditMask.text := IntToStr(TppReport(ppViewer.Report).ReportPageCount)
Can someone help ?
Thanks
Petter
D7
RB7
I have a Viewer form like in Your demos, where the page number and page
count is shown in an editmask field.
The Viewer is beeing used for both reports and archive files. Since
PageCount is a property from the report / archive, I need to do a test in
order to decide wich one I'm using to get the PageCount.
Something like
if ppViewer.producer = TppCustomArchiveReader then
EditMask.text :=
IntToStr(TppArchiveReader(ppViewer.Report).ArchivePageCount)
else
EditMask.text := IntToStr(TppReport(ppViewer.Report).ReportPageCount)
Can someone help ?
Thanks
Petter
D7
RB7
This discussion has been closed.
Comments
I created a simple example that uses the code you gave below with some minor
adjustments that does what you need. Note that there is no
TppViewer.Producer property or TppReport.ReportPageCount property but other
than that the code should work correctly. Hope this helps.
http://www.digital-metaphors.com/tips/ArchiveAndTemplateViewer.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The test You performed was what I was looking for.
:-) Petter