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

OnLastRecord vs group totaling

Status
Not open for further replies.

hoynan

Programmer
Dec 23, 2010
2
US
Hi there,

I am working on conditional suppressing of page header text that I have duplex printing on the back page of my report, every odd page suppressed.

So I have my report of data on page 1 (page header suppressed), my page header text on page 2 (this prints on the back), report data on page 3 (page header suppressed), my page header text on page 4 (this prints on the back), report data page 5, etc.

To get my text that is in this conditionally suppressed page header on the final page, I have it duplicated in as a report footer as well, to force it in at the end of the report even after all records have printed.

Here's my problem: so that my page header doesn't print on my final page of the report, which is even numbered but is handled by the report footer text, and now I don't want it twice, I have the page header suppression set to suppress every odd page and suppress if OnLastRecord.

//if first page, odd page or last record (after last record is handled by Report footer)
//then suppress the terms section =true
PageNumber = 1 or Remainder(PageNumber,2) <> 0 or OnLastRecord

This works fine unless my last record occurs on the page but my group total didn't fit, and spans another page. Then the program thinks, yes it's last record so don't put pageheader on next page. My problem then is that I get last record report data on an odd page, followed by odd page with just total data, then my text at the end, due to the report footer.

If I could figure out a way to get a handle on where the group footer is occurring, then I might be able to add that to the suppression conditon. So if OnLastRecord but group footer has not occurred don't suppress, if OnLastRecord but group footer has occurred suppress.

Any ideas?

Thanks alot!
Nancy
 
Could you just use a second group footer for each back page instead of using the page header? You would format it to new page before and also new page after->x+2->onlastrecord

-LB
 
Hi LB,

Thanks for the reply! I have a question about your idea. Doesn't the group footer only show up at the end of the group? So if I have 3 pages of records, Won't I only get the group footer at the end of the 3 pages?

Thanks,
Nancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top