Total Number of Pages from Formula 
Author Message
 Total Number of Pages from Formula

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



Sat, 10 Jan 2004 21:10:34 GMT  
 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



Sat, 10 Jan 2004 21:23:04 GMT  
 Total Number of Pages from Formula
TotalPageCount is available as a special field that you can use in a
formula. - why not use that? Or the special field itself as that is also
available?


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



Sun, 11 Jan 2004 10:57:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adding Total Number of slides to the page number field in the footer

2. Word not printing total number of pages in page footer correctly

3. Total Page Count in formula field?

4. Page number totals...

5. total number of pages in VBA word

6. total number of pages in all open docs

7. running total page numbers

8. Total Number Pages in Report?

9. total number of pages

10. Crystal - Displaying Total Number of Pages to be Printed

11. Total number of pages in a report?

12. How To Detect Total Page Number ?

 

 
Powered by phpBB® Forum Software