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

Totals only on last page of Invoice

Status
Not open for further replies.

TerryEA

Technical User
Jun 20, 2004
99
GB
Hi all

Point me in the right direction?

I have a multi-page invoice report. The totals are populated by the On Format event of the page footer. I want to omit (or make invisible) the totals on all pages except the last one. I don't want to use the Report Footer section since it seems to always print an extra page, just for the totals. Is there an easy way to do this?

Terry
 
I've worked it out now.

I compared the item line count, in the detail section, with a running sum of items printed so far, in the group footer section, to determine if the totals should be visible or not. They're only visible on the last page, when the running sum equals the count.

Terry
 
The above works well for a report designed to print several invoices at once, where any of the invoices could have more than one page.

Another solution for a general report, where you only want totals on the last page, is to compare the controls: [Page] and [Pages] to determine when you're on the last page, and making the totals controls visible or not as appropriate.

Terry
 
I don't want to use the Report Footer section since it seems to always print an extra page, just for the totals.
I only get an extra page if there is not enough room. Perhaps you need to shorten the height on your report footer to be just enough to show the total.
It might also have something to do with the CanShrink value of the report footer section or one of the sections above it.

 
Hi JoeAtWork

Thanks for responding. I'll have a play about with your suggestion. It's difficult to shorten the part with the invoice totals on because I want the invoice to look pretty conventional, showing Net, VAT and Gross totals, along with payment terms and all that. Anyway I'll have a go with Can Shrink and see what happens.

Thanks again

Terry
 
You might also want to review this KB Article "How to Print a Group Footer at a Specific Location"

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi dhookom

Yeh, I found that article and read it early on but it wasn't quite what I wanted. It wasn't so much a question of printing the totals in same place on every page. I didn't have any problems with that, using the page footer, but more a question of not printing them at all except on the last page. However, the article was interesting and informative and I can imagine using the technique for other reports, for consistently placed group footers.

Thanks nevertheless.

Terry
 
I thought you would create an invoice footer and use the solution to position the footer section where you wanted.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom

I see what you mean now. I'll read it again!

Thanks, Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top