totals from subreports

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?
 
F

Fons Ponsioen

I think the easiest way would be to have a summary query
and place the results in the report footer.
Hope this helps
Fons
 
M

Marshall Barton

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)
 

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