To forward a subtotal to the next page

G

Guest

In a report I need in each page to have a subtotal (in the page footer) to be
forwarded to the nex page (in the page header).The subtotal of a page should
be the sum of the items of that page + the forwarded sum of the previous
page.
I hope I have been clear.
Thanks in advance
Mansoor
 
M

Marshall Barton

Mansoor said:
In a report I need in each page to have a subtotal (in the page footer) to be
forwarded to the nex page (in the page header).The subtotal of a page should
be the sum of the items of that page + the forwarded sum of the previous
page.


Create a text box named txtRunTotal in the detail section.
Bind it to the field you want to subtotal and set its
RunningSum property to OverAll.

Then add code to Page Footer section's Format event:

Me.pagefootertextbox = txtRunTotal
Me.pageheadertextbox = txtRunTotal
 
G

Guest

Thank you Marshall Barton, it works perfectly.
I had this problem for many years, and I regret I did not dare to ask help
for this my problem.
Now I understand "almost" every has a solution.
Thank you again
Mansoor
 
G

Guest

To Marshal Barton
as I said it works perfectly, but sometimes in some reports, I get on the
first page, in the pageheader, the Grand Total and from the second page up to
the last page all the figures are correct.The subtotal in the Pagefooter is
correct.
I do not know if I do somethin wrong.
Mansoor
 
M

Marshall Barton

I think that will happen in some reports that for one reason
or another must be formatted twice (e.g. a text box with
Pages in it).

To fix it add a line of code to the Report header section's
Format event procedure:

Me.pageheadertextbox = Null

If you don't have the Report header section, include it
(View menu) and make it invisible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top