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

About Report.PageCount

edited January 2003 in End User
Hi all,

I am writting an End-User Report Program. In one sub-report of an End-user
report, I have a label to show the page count of the subreport (Implement
onGetText and set Text := IntToStr(Report.PageCount)). When I preview the
report in runtime, that sub-report actually has two pages(Since the details
are large), but the page count label is shown '1' in first page, shown '2'
in the second page. I have tried put a system variable in that subreport and
set to "PageSet", then that system variable shown "1 of 1" in the first page
and '2 of 2' in the second page!

I have already set the report to 2 pass.
I have also tried Implement the event "OnPrint" instead of "OnGetText".

Have any one can help me?

Thanks,
Raymond Ng.

Comments

  • edited January 2003
    Try testing with the report demo #51 and 52. Theye are one pass by default.
    If you set them to psTwoPass, the page numbers should begin showing the
    total count.

    In your report, make sure Report.SaveAsTemplate is false, in case the
    template is being loaded from template file, instead of being saved on the
    form. Place a check in the BeforePrint event to verify that the PassSetting
    is psTwoPass. Is your report using RB 7? Update and use RB 7 if you aren't
    using it for this application.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.