Hi everyone,
I need to have a column in Cust. Ledger Entries Form that has the progressive sum of the Field "Amount (LCY)".
Example:
Entry No. "Amount (LCY)" Prog Sum
01 100 100
02 200 300
03 -300 0
04 -500 -500
I can do this when the form opens, but i would also like to be able to refresh the values if a filter is applied to the form.
I wonder if this is possible at all...
Thanks
0
Comments
Design the form and add a new text column set the source expression to
GetProgresiveSum("Entry No.")
Create a function as bellow.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
GetCurrBalance() : Decimal
Custledg.COPY(Rec);
IF Custledg.FIND('-') THEN REPEAT
Custledg.CALCFIELDS(Amount);
BalanceAmount := BalanceAmount + Custledg.Amount;
UNTIL (Custledg."Entry No." = Rec."Entry No.") OR (Custledg.NEXT = 0);
EXIT(BalanceAmount);
Which will be functioning independant on sorting, filters etc.
Kind regards,
Quila