I have created a report based on ‘Cust. Ledger Entry’ table. In ‘Document Type’ field of ‘Cust. Ledger Entry’ table there are many options like: Invoice, Payment, Credit Memo. The CLE table also contains an ‘Amount’ field which shows the amounts for different Document Types.
Now in my report I need to create three different fields in which I can display the sum of the amounts of their related Document Types i.e.
Invoice Amount Payment Amount Credit Memo Amount
Shows the sum of all the Shows the sum of all the Shows the sum of all the
Amounts for all the Invoices Amounts for all the Amounts for all the Payments Credit Memos
for that I have written the following code:
Cust. Ledger Entry - OnAfterGetRecord()
‘‘Cust. Ledger Entry’’.SETRANGE(’‘Cust. Ledger Entry’’.“Document Type”,Cust. Ledger Entry’’.“Document Type” :: Invoice);
By using this code I can only able to get the records of all the Invoice amounts. But how can I get the Amounts of all the other options like Payment, Credit Memo. Please help me.