I create a formula to calculate the total for the following field, which is group by InvNo.
whilereadingrecords;
numbervar total_fee := total_fee + {statementRe.RoadFee} + {statementRe.WeighFee} +{statementRe.CheckFee}+{statementRe.QuarantineFee}+{statementRe.ParkFee}+{statementRe.RegisterFee}+{statementRe.TunnelFee}+{statementRe.CustomsFee}+{statementRe.OtherFee};
total_fee
This formula is working fine to calculate the fee, but I want it reset when the {statementRe.InvNo} is change.
I try to create another formula to reset, I got this error message
"This function cannot be used because it must be evaluated later."
WhilereadingRecords;
if {statementRe.InvNo} <> Previous({statementRe.InvNo}) then
numbervar total_fee :=0;