Calculated Fields with subreports

Kozbot

Registered User.
Local time
Today, 09:04
Joined
Jan 16, 2013
Messages
110
Hello

I have a production report with 4 one to many sub reports (material reworked, reclassified, rejected, and issued). Each of those sub reports has a sum field totaling up the material reworked, rejected, etc for that lot.

I need a calculated field that subtracts the totals in each sub report from the reported amount produced in the main report.

Should I do this with a calculated field on the report. If so how would I reference the summed fields in the sub reports?

Or should I put a summed field of the amount reworked, rejected, etc in the query the report is based on and make a calculated field off that.?
 
I would do this within the report.

to sum values for each subreport in the form footer put an unbound control, we'll call it SubTotal and in its control source put

=sum(myControl)

where myControl is the name of the control you want summing

in your main report you would then have another unbound control with the tcontrol source as follows:

=subform1.form.subtotal+subform2.form.subtotal ... etc

where subform1, 2 etc are the names of your subforms
 
I would do this within the report.

to sum values for each subreport in the form footer put an unbound control, we'll call it SubTotal and in its control source put

=sum(myControl)

where myControl is the name of the control you want summing

in your main report you would then have another unbound control with the tcontrol source as follows:

=subform1.form.subtotal+subform2.form.subtotal ... etc

where subform1, 2 etc are the names of your subforms

I am doing this. But I get a ?Name error

My report is not finding the sum total correctly.
 
I presume your are substituting myControl for the name of your control? - If so is it the name of the control or what you have in the control source?
 

Users who are viewing this thread

Back
Top Bottom