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

running total at the bottom of each page

Status
Not open for further replies.

wreiche

IS-IT--Management
Sep 28, 2006
36
CA
I have a subreport which generates an invoice which usually runs for several pages, one item per line. I have been asked to add a line at the top and bottom of each report page which contains the running total carried forward from the previous page (top) and the running total at the end of the page (bottom).

I cannot put the running total in the page header/footer because the header/foorter are defined in the main page and the running total is only accessible in the subreport.

I have tried putting the running total in the report header/footer, but then it only appears at the beginning and end of the report not on each page.

Can someone point me in the right direction here:
- should I be doing this in the page h/f; report h/f; or somewhere else?
- if page h/f, how do I add them to the subreport?
- if report h/f, how do I get them to print on each page?

Thanks in advance,

Werner
 
Create a fake page header in the subreport by creating a formula like this:

whilereadingrecords;
""

Then insert a group on this formula and choose "repeat group header on each page". Make sure this new group is your Group #1. Then place the running total in the new page header and footer.

-LB
 
Thanks for the help lbass. I have two problems with the running total lines. The header line includes the total for the first line on the page, which it should not. Also, the footer line does not appear on each page, only at the end of the sub-report.

I tried using beforereading instead of whilereading. When I did this, the following error was reported:
Group specified on a non-recurring field. Details: @GroupHeader Failed to export the report.

Any ideas?
 
Sorry about that. I wasn't thinking. The fake page header ONLY gives you a page header, not a page footer. I think you can adapt the running total in the page header by using a formula like this:

{#yourrunningtotal}-{table.amt}

However, you won't be able to display a page footer except by inserting a detail_b section and then counting the rows per page and suppressing all but the last row based on the row count.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top