Hi,
I have 2 subreports each of which has a Month-to-date (MTD) total stored in a shared variable. The subreports occupy different sections in the detail section of the main report. I need to total the subreport totals in the main report.
SUBREPORT I:
Formula field name 'SharedMTDVisitorPermitRVSum'
Code for subreport MTD total 1:
Shared NumberVar MTDVisitorPermitRVSum;
MTDVisitorPermitRVSum := Sum ({@MTDVisitorVendorPermits}) + Sum ({@MTDRV});
SUBREPORT II:
Formula field name 'SharedMTDCoinGateSum'
Code for subreport MTD total 2:
Shared NumberVar MTDCoinGateSum;
MTDCoinGateSum := Sum ({@MTDParkingDeckCoinGate});
MAIN REPORT TOTAL FIELD:
Formula field name 'OtherRevenueMTDTotal'
Code for main report total:
WhilePrintingRecords;
Shared NumberVar MTDVisitorPermitRVSum;
Shared NumberVar MTDCoinGateSum;
MTDVisitorPermitRVSum + MTDCoinGateSum;
I always get a value of zero returned in the main report. The subreport totals are non-zero values that display correctly. How do I correct this? What is wrong with my main report total / subreport totals? I substituted the word 'Shared' with 'Global', still the same results.
Any help would be appreciated. Thanks in advance.
Chad
I have 2 subreports each of which has a Month-to-date (MTD) total stored in a shared variable. The subreports occupy different sections in the detail section of the main report. I need to total the subreport totals in the main report.
SUBREPORT I:
Formula field name 'SharedMTDVisitorPermitRVSum'
Code for subreport MTD total 1:
Shared NumberVar MTDVisitorPermitRVSum;
MTDVisitorPermitRVSum := Sum ({@MTDVisitorVendorPermits}) + Sum ({@MTDRV});
SUBREPORT II:
Formula field name 'SharedMTDCoinGateSum'
Code for subreport MTD total 2:
Shared NumberVar MTDCoinGateSum;
MTDCoinGateSum := Sum ({@MTDParkingDeckCoinGate});
MAIN REPORT TOTAL FIELD:
Formula field name 'OtherRevenueMTDTotal'
Code for main report total:
WhilePrintingRecords;
Shared NumberVar MTDVisitorPermitRVSum;
Shared NumberVar MTDCoinGateSum;
MTDVisitorPermitRVSum + MTDCoinGateSum;
I always get a value of zero returned in the main report. The subreport totals are non-zero values that display correctly. How do I correct this? What is wrong with my main report total / subreport totals? I substituted the word 'Shared' with 'Global', still the same results.
Any help would be appreciated. Thanks in advance.
Chad