Storyteller
Instructor
Hello All,
I am using the 3 formula routine to calculate a running total with variables.
The formulas are: (note I really only needed 2)
@ACB/Share Initialize
WhilePrintingRecords;
CurrencyVar ACBperShareRunningTotal;
ACBperShareRunningTotal:={Avg_Cost_at_010101.Average Cost};
@ACB/Share Evaluate
EvaluateAfter ({@ACB Evaluate});
CurrencyVar ACBperShareRunningTotal;
ACBperShareRunningTotal:= If {@S Evaluate}=0
Then ACBperShareRunningTotal:=0
Else ACBperShareRunningTotal:=({@ACB Evaluate}/{@S Evaluate});// A running total/running total
//@ACB Evaluate and @S Evaluate are on the same line as @ACB/Share Evaluate, so I need them to be evaluated first.
My problem is that when I try to do the following:
Previous(@ACB/Share Evaluate) I get the following message "This Field has No Previous or Next Value". The frustrating part of this is that I can see the value when I run the report.
I've experimented with a number of {Fields} and {@Formulas} and the Previous() function works. It is just when I try to use it with any of the Running total formulas {@ACB Evaluate}, {@ACB/Share Evaluate}, {@S Evaluate} is when I get the error message.
Needless to say I'm getting frustrated. Any help would be greatly appreciated.
Thanks,
Michael
I am using the 3 formula routine to calculate a running total with variables.
The formulas are: (note I really only needed 2)
@ACB/Share Initialize
WhilePrintingRecords;
CurrencyVar ACBperShareRunningTotal;
ACBperShareRunningTotal:={Avg_Cost_at_010101.Average Cost};
@ACB/Share Evaluate
EvaluateAfter ({@ACB Evaluate});
CurrencyVar ACBperShareRunningTotal;
ACBperShareRunningTotal:= If {@S Evaluate}=0
Then ACBperShareRunningTotal:=0
Else ACBperShareRunningTotal:=({@ACB Evaluate}/{@S Evaluate});// A running total/running total
//@ACB Evaluate and @S Evaluate are on the same line as @ACB/Share Evaluate, so I need them to be evaluated first.
My problem is that when I try to do the following:
Previous(@ACB/Share Evaluate) I get the following message "This Field has No Previous or Next Value". The frustrating part of this is that I can see the value when I run the report.
I've experimented with a number of {Fields} and {@Formulas} and the Previous() function works. It is just when I try to use it with any of the Running total formulas {@ACB Evaluate}, {@ACB/Share Evaluate}, {@S Evaluate} is when I get the error message.
Needless to say I'm getting frustrated. Any help would be greatly appreciated.
Thanks,
Michael