Report with Sub-report - HELP PLEASE

F

FatMan

What I am trying to do is calculate the sum of a control on a sub report that
refeers to some fields on the main report. In the detail section of the sub
report the control calculates the values correctly and it references some
fields on my main report. Yet when I try to calculate the total for the
control in the footer section it treats my reference to the fields on my main
report as paramater values. For the life of me I can not figure out what I
am doing wrong. Can anyone help please?

Main Report Name: rptDailyProductionApples

Sub report Name: rptDailyProductionApplestblWipDistLabsubreport

Control on sub report (in detail section) to be totaled: txtUnitCostProd

Contents of [txtUnitCostProd]:
=IIf([GlCode]="61269-02",+[Reports]![rptDailyProductionApples]![txtSetUpUnitCost]+[Reports]![rptDailyProductionApples]![txtProductionUnitCost]+[Reports]![rptDailyProductionApples]![txtCleanUpUnitCost],[txtOtherExpenseUnitCost])

I have tried entering the following with both resulting in the "paramater
value" issue.

=sum([txtUnitCostProd]) and

=sum(IIf([GlCode]="61269-02",+[Reports]![rptDailyProductionApples]![txtSetUpUnitCost]+[Reports]![rptDailyProductionApples]![txtProductionUnitCost]+[Reports]![rptDailyProductionApples]![txtCleanUpUnitCost],[txtOtherExpenseUnitCost]))

Can anyone help pelase?

Thanks,
FatMan
 
Top