add total filed to to report id 109 customer ageing simple a to every customer

Hi guys i face problem in some reports what i need is aging report this report exist in dynamic navision with number id 109 what i need as following :

customer no total 0-30 31-60 61-90 91-120

1926 8,053,400 343140 1003425 1324260 5382575

2638 5,095,460 4153480 924630 17350

2388 3,675,895 1056120 1328545 952465 338765

this total represent debit amount - credit amount and it cannot be negative because it represent only accounts that debit increase about credit

so that what i need to make total field this total field include debit amount - credit to every customer

how i make total as this.

the code that found in report 109 customer aging simple as following in after get record of customer as bellow:

PrintCust := FALSE;
FOR i := 1 TO 5 DO BEGIN
DtldCustLedgEntry.SETCURRENTKEY(“Customer No.”,“Initial Entry Due Date”,“Posting Date”);
DtldCustLedgEntry.SETRANGE(“Customer No.”,“No.”);
DtldCustLedgEntry.SETRANGE(“Posting Date”,0D,StartDate);
DtldCustLedgEntry.SETRANGE(“Initial Entry Due Date”,PeriodStartDate[i],PeriodStartDate[i + 1] - 1);
DtldCustLedgEntry.CALCSUMS(“Amount (LCY)”);
CustBalanceDueLCY[i] := DtldCustLedgEntry.“Amount (LCY)”;
IF CustBalanceDueLCY[i] <> 0 THEN
PrintCust := TRUE;
END;
IF NOT PrintCust THEN
CurrReport.SKIP;

how i modified to accept total filed.