Creating a Customer Report

I am creating a report that will use tables: Cust. Ledger Entry and Sales Invoice Header. I want to list by a field in the Sales Invoice Header (Your Reference) the original invoice amount and the remaining balance. The report will list the following: Cust #, Cust Name, Invoice #, Your Reference, Original Amount ($), Remaining Balance ($). The report will be in tabular form. I can get all the information with the exception of Original Amount ($) and Remaining Balance ($). If I use the Amount field from the Sales Invoice Header, the correct amount appears. The report is designed and everything works well with the exception of the two fields, Original Amount ($) and Remaining Balance ($). These amounts return with zero amounts. I need some help with the C/AL code. Don’t know how to hook-up this area. Thx!

use calcfields with Original Amount ($) and Remaining Balance ($). These two fields are flowfields in table Cust. Ledger Entry

Thanks for the info on the CalcFields. When I put the RB$ in the CalcField, the numbers popped up properly. I grabbed the ‘sales amount including tax’ from the Sales Invoice Header and that field gives the correct amount. Needed to put in a line of code for the “currrept” total and I’m done except for the company picture! An earlier post helped me with that part. Appreciate the help…