totals from subreports

  • Thread starter Thread starter DKINGSTON
  • Start date Start date
D

DKINGSTON

I have a main report that contains several (4) subreports.
Each subreport has a text box that uses the sum function,
=sum([queryname.fieldname]).
How can I show the sum of the 4 subreport text boxes on my
main report?
 
I think the easiest way would be to have a summary query
and place the results in the report footer.
Hope this helps
Fons
 
DKINGSTON said:
I have a main report that contains several (4) subreports.
Each subreport has a text box that uses the sum function,
=sum([queryname.fieldname]).
How can I show the sum of the 4 subreport text boxes on my
main report?

If you just want a text boxes to display the total from each
subreport, you can use an expression like:

=subreport.Report.totaltextbox

where subreport is the name of the subreport **control** on
the main report and totaltextbox is the name of the text box
in the subreport with the calculated total.

If there's any possibility that a subreport may not have any
data, then the expression would be:

=IIf(subreport.Report.HasData,subreport.Report.totaltextbox,0)
 
Back
Top