adding Original Amount to Aging A/R report

Hello everyone,

I would like to request help on adding the original amount to the aging A/R report.

Ihave successfully added three columns but when I add this column I just get 0s.

This iwhat I have added

Make Excel Header

ExcelBuf.AddColumn(Customer.FIELDCAPTION(“Phone No.”),FALSE,’’,TRUE,FALSE,TRUE,’’);
ExcelBuf.AddColumn(“Cust. Ledger Entry”.FIELDCAPTION(“Salesperson Code”),FALSE,’’,TRUE,FALSE,TRUE,’’);
ExcelBuf.AddColumn(“Cust. Ledger Entry”.FIELDCAPTION(“Credit Amount”),FALSE,’’,TRUE,FALSE,TRUE,’’);
ExcelBuf.AddColumn(“Cust. Ledger Entry”.FIELDCAPTION(“Original Amount”),FALSE,’’,TRUE,FALSE,TRUE,’’);

Excel Data

ExcelBuf.AddColumn(Customer.“Phone No.”,FALSE,’’,FALSE,FALSE,FALSE,’’);
ExcelBuf.AddColumn(“Cust. Ledger Entry”.“Salesperson Code”,FALSE,’’,FALSE,FALSE,FALSE,’’);
ExcelBuf.AddColumn(“Cust. Ledger Entry”."Original Amount’,FALSE,’’,FALSE,FALSE,FALSE,’’);

Thank in advance for any help I can get.


“Original Amount” is a flow field, so you need to use CALCFIELDS for that.

So before the following line:

ExcelBuf.AddColumn(“Cust. Ledger Entry”."Original Amount’,FALSE,’’,FALSE,FALSE,FALSE,’’);

You need to write following:

“Cust. Ledger Entry”.CALCFIELDS("Original Amount’);

Once again Dhan has baled me out.

Thanks again Dhan it worked perfectly.

You are welcome. :slight_smile: