Sum of sub report in detail section of main report?

geralf

Registered User.
Local time
Today, 11:01
Joined
Nov 15, 2002
Messages
212
I have a subreport in the details section of the main report. This means that for every record in the main report, a subreport is shown. I have calculated a sum in the sub report by placing a control in the footer section of the sub report, and have placed a new control on the main form, refering to the calculated sum field in the sub report. Now I want to sum all the calculated sum controls from the sub forms, to get the emtire sum. How can I do this?

Thanks in advance
 
Two ways, sum the subtotal controls in a control, or add a subreport whose recordsource is the query total you want. The latter may be the easiest if you have numerous subreports. I have 79 subreports on in one instance and wouldn't consider the summing of all the control, the query is lightning fast. In your case the latter may require summing query with multiple unions, which would still be very fast.
 
Thanks for your reply. I used your first suggestion, and it works great. Thanks!
 

Users who are viewing this thread

Back
Top Bottom