Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TotalPageCount when working with 'reset page number after'

Status
Not open for further replies.

SarahVandenbroucke

Programmer
Mar 4, 2003
14
BE
On my report I have a Page Header that should only be suppressed on the last page that contains the Report Footer. The problem is that in the report I reset the page number after a group, so I have no idea what the last page is, because TotalPageCount gives the number of pages of each group.

Is there any way you can know the total page count of the entire report and the actual page number of a page when you are working with the option 'reset page number after'? Because then I could suppress the Page Header when PageNumber = TotalPageCount...

Or is it possible to suppress that Page Header on the page the Report Footer is printed?

Many thanks!
 
hi
Try
----------------------------
OnLastRecord =TRUE
 
Thank you for your reply, but I tried this already.

When the last record is the only record in the last group, the page header is not printed on the last but one page and on the last page.

So this creates another problem...
 
You could write a formula in the Group footer that says:

WhilePrintingRecords;
BooleanVar Ending;
If OnLastRecord
then Ending :=True
else Ending :=False


Then you should be able to suppress the PH with:
WhilePrintingRecords;
BooleanVar Ending;
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
The last page header is going to be assessed before the last group footer.

Perhaps I'm misunderstanding the problem, but why are people focusing on the OnLastRecord function?

Naith
 
I assume from the description that the last page is a total page that prints separately from the last group. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Ah, I guess the New Page After option on the group footer must also have been switched on.
 
Yes, the report footer contains the total of the different groups and indeed, the option 'New page before' is switched on for the group footer, because I wanted it on a new page.

The solution Ken provided solved my problem.

(sorry if the description of the problem was not clear enough)
 
It was clear enough for Ken. I suspect I just haven't switched on my common sense today.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top