Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Totals of subreport in a Group sum

Status
Not open for further replies.

jw45

Programmer
May 27, 2005
56
US
I have a report/subreport as follows:


Date Qty Comp Rem
9/12 100 90 10
Oper Made
1 35
2 25
3 20
Total 90


9/14 200 150 50
Oper Made
1 150
Total 150
-----------------------------------------------------------
300 240 60


The ‘Comp’ value is a reference to the subreports total (txtSumProd) and the ‘Rem’ is a calculated value by taking the ‘Qty’ from the main report and subtracting the ‘Made’ from the subreport into a text field ‘Text53’. This all works fine.

The problem is that I want to sum the ‘Made’ from the total of all the subreports and subtract that from the sum of the ‘Qty’ to get a total remaining.

When I try to sum the total pieces made using =sum(rptOrdersDetailSubreport.Report!txtSumProd), all I get is the value the last subreport and not the sum of all subreports. I also get #Error if the subreport has no data.

Can someone tell me what I am doing wrong?
 
I'm having a similar problem - can't get data from a subreport to the main report.

I'm wondering if there is a way to get the Control Source of a report to pull from more than one query? If so, then all the fields I need would be available for summing/etc on my main report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top