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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to enter LastPage Variable in formula

Status
Not open for further replies.

MAT2001

Technical User
Feb 22, 2001
20
CA
Creating a report that has two sub-reports. Have sorted out headers and such, and having a problem with the footer on last page. Report setup such that there is only one cover page, multiple middle pages, and one last page. Have got cover page, and middle page footers working. What I need now is the ability to put a variable in so that I can create an "If Then" statement to print footer on last page.

Any help would be appreciate! (o:
 
Put last page info into the report footer, and in the section expert for the report footer use the "new page before" option with a condition formula. This will let you control whether the page break exists or not for the report footer. You can use the section suppression condition to control wether or not it prints at all. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks for the information. This does not quite solve my problem, as using PageFooter to create my footer for other pages. So this will still print unless I am able to supress for last page. I am fairly new at Crystal and trust me have learnt a lot from playing and reading this site. Great resource!

I still end up with the problem that I do not know how to create a formula or enter variable that tells system it is last page of report. So am not able to control printing of last page of information either way I do this.

 
If you need to suppress the page footer
of the last page, go into the "Format Section"
dialog for the page footer, click on the Formula
button for the Suppress attribute, and enter the following simple Formula:
=========================
OnLastRecord
=========================

hth,
-Ido
 
Thanks for all your help did get me going in the right direction. Ended up adding line below in the formula field to determine last page of report, which allowed me to have unique ID numbers to be place on the page depending on if it was the cover page, item sheet(s), or summary sheet (last page). Need this ID for when forms are returned to be processed by OCR software.

If PageNumber - TotalPageCount=0 then


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top