subtotal on each page

M

Mruth

Is it possible to have a subtotal on each page of a report?
as an example I have item 1 item 2 item3 which I get a total on the last
page of the report, but I would like to have the subtotal of each coloum for
just that page.

Maybe beter put page 1 has 10 records and each item has a value of 10.
at then end of page 1 each colum would have a total of 100
Page two would have a total for each coloum of 100
and so forth. Last page may have the sub as well as the grand total.

Thanks in advace.
 
W

Wayne Morgan

I haven't tried this, but I think it will work.

Place a running sum textbox in the detail section (hidden if desired) and
have it sum the value of each item. In the Page footer, place another hidden
textbox and set it equal to the running sum textbox in the detail section.
Add a second textbox to display the page total. In the page footer's Format
event, declare a static variable as type Long or Currency (depending on
whether what you are summing has decimals in it). Place the difference of
the hidden textbox and this variable into the visible textbox
(Me.txtPageTotal = Me.txtFooterRunningSum - lngPreviousSum) in the report
footer then set this variable equal to the hidden textbox in the footer so
that it will have the correct value for the next page.
 
Top