Subreport Page footer does NOT display

  • Thread starter Thread starter bnhcomputing
  • Start date Start date
B

bnhcomputing

I have a subreport that keeps a running sum and then displays the sum
in a field in the page footer of the sub report.

When I run/execute the subreport, the page footer displays and the
total is displayed.

However, when I run/execute the main report, the page footer is NOT
displayed in the subreport.

How do I get the page footer to display in the subreport?
 
A subreport will not display any page sections or run any page related
events. You will need to use the report or a group footer.
 
I don't believe it's possible. Subreports don't have page headers or
footers.
 
bnhcomputing said:
I have a subreport that keeps a running sum and then displays the sum
in a field in the page footer of the sub report.

When I run/execute the subreport, the page footer displays and the
total is displayed.

However, when I run/execute the main report, the page footer is NOT
displayed in the subreport.

How do I get the page footer to display in the subreport?


Since the main report is "in charge" of pages, subreport
report header/footer sections and page events are ignored.
In other words, you need to find a way to get your value
displayed in the main report's page footer section.

This can be difficult with a running sum because you are
probably either using the Page event to copy the current
value of the running sum to a page footer text box or the
page footer just uses an expression to reference the running
sum text box. The first thing I would try is to set the
main report page footer text box to reference the subreport
running sum text box using something like:
=subreportcontrol.Report.runsumtextbox

If that doesn't do it, then try adding a line of code to the
Detail section's Print event to copy the value:
Parent.totaltextbox = Me.runsumtextbox
The main report text box should then display the value in
the last detail on the page.
 
Not a guru here but I worked around this issue by creating a subReport2 that
had the running sum/totals/formulas of subReport1 footer in the detail of
subReport2. Thereafter placed subReport2 under subReport1 on the main
report. If the properties of both subrReports from the main report are set
to "Can Grow/Shrink" = True you will find that subReport2 will align based on
the the size of subReport1 and if the same record source is used for both
subReports you will get an accurate result on every run and .

hope this makes sense
 
Back
Top