
Total Number of Pages from Formula
Hi Ken,
I may be misinterpreting this, but I believe that you can't 'pass' the
page number to the report header because it has already been processed by
the time your page number has been calculated. One way to get the page
number into your report header is to save your report with a different file
name and insert that report into your main report as a subreport. Place the
subreport in your report header, suppressing everything but the page count.
What should happen is that your main report will process the report header,
calling the subreport. The subreport will be processed and return the page
count, then your main report will continue processing normally.
Bob Holmes
Quote:
> Hello:
> I would like to count the number of pages of my report and place the
> total it in the report header. How can I do this in Crystal Reports
> using formulas. I have managed to count each page, but I can't seem
> to "pass" the value to a formula in the header. Here's how I'm
> counting the pages (and showing them in the page footer).
> WhilePrintingRecords;
> numberVar gPageCount;
> if gPageCount = 0 then gPageCount := 1;
> gPageCount := gPageCount + 1;
> How can I take the final value of gPageCount and pass it/show it on
> the report header.
> Thanks in advance, and sorry for my previous post,
> Ken