I have 3 formulas to create a running total.
//@Initialize
WhilePrintingRecords;
NumberVar RunningTotal1;
Runningtotal1 := 0;
//@Evaluate
evaluateafter({RECEIPT_MASTER.PAYMENT_AMT});
NumberVar RunningTotal1;
if onfirstrecord and {@CompareDates} = "1" then
RunningTotal1 :={RECEIPT_MASTER.PAYMENT_AMT}
else if
{RECEIPT_MASTER.RECEIPT_NUM} <> previous ({RECEIPT_MASTER.RECEIPT_NUM}) and
{@CompareDates} = "1" then
RunningTotal1 := RunningTotal1 + {RECEIPT_MASTER.PAYMENT_AMT}
//@Display
EvaluateAfter ({RECEIPT_MASTER.RECEIPT_NUM});
WhilePrintingRecords;
NumberVar RunningTotal1;
RunningTotal1;
I have used these formulas in many reports but for some reason in this particular report it is not working correctly. The problems are sporadic and changing.
1. The first problem is that the total is resetting back to zero in the middle of the report for no apparent reason.
2. The next problem is that the total will display "0".
The 2 problems do not always happen. Sometimes the report will run perfectly. Sometimes it will run and have issue 1 and sometimes it will have issue 2. I don't know where to begin since there seems to be no consistency to what is going on. Any ideas?
//@Initialize
WhilePrintingRecords;
NumberVar RunningTotal1;
Runningtotal1 := 0;
//@Evaluate
evaluateafter({RECEIPT_MASTER.PAYMENT_AMT});
NumberVar RunningTotal1;
if onfirstrecord and {@CompareDates} = "1" then
RunningTotal1 :={RECEIPT_MASTER.PAYMENT_AMT}
else if
{RECEIPT_MASTER.RECEIPT_NUM} <> previous ({RECEIPT_MASTER.RECEIPT_NUM}) and
{@CompareDates} = "1" then
RunningTotal1 := RunningTotal1 + {RECEIPT_MASTER.PAYMENT_AMT}
//@Display
EvaluateAfter ({RECEIPT_MASTER.RECEIPT_NUM});
WhilePrintingRecords;
NumberVar RunningTotal1;
RunningTotal1;
I have used these formulas in many reports but for some reason in this particular report it is not working correctly. The problems are sporadic and changing.
1. The first problem is that the total is resetting back to zero in the middle of the report for no apparent reason.
2. The next problem is that the total will display "0".
The 2 problems do not always happen. Sometimes the report will run perfectly. Sometimes it will run and have issue 1 and sometimes it will have issue 2. I don't know where to begin since there seems to be no consistency to what is going on. Any ideas?