Forums
Message Thread:
--------------------------------------------------------------------------------
I am using a shared variable to pass the results of a formula from a subreport to a main report. If the value of the results is other than zero, than the receiving formula/variable in the main report works fine. If the results equal zero, the subreport calculates the passing formula/variable just fine, but the receiving formula/variable is holding on to the results of the previous calculation that had a result other than zero.
I have tried resetting the variable value to zero at the beginning of the passing formula/variable, but it didn't make any difference. The formula I have used for the passing formula/variable is:
CurrencyVar PeriodDifference := 0;
WhilePrintingRecords;
Shared CurrencyVar PeriodDifference := Sum ({JEDetailSR_ttx.Debit}, {@GLAccountNumber}) - Sum ({JEDetailSR_ttx.Credit}, {@GLAccountNumber});
The receiving formula/variable is:
WhilePrintingRecords;
Shared CurrencyVar PeriodDifference;
Thanks,
Keoki