Can't get the Amounts of other options from Document Type field in CLE table in my report.

Rajat_MRajat_M Member Posts: 34
edited 2016-06-09 in NAV Three Tier
Hello Experts,

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 field(Shows the sum of all the Amounts for all the Invoices )
Payment Amount field(Shows the sum of all the Payments)
Credit Memo Amount field(Shows the sum of all the Amounts for all the of 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 records of all the other options like Payment, Credit Memo. Please help me.

Regards,

Answers

Sign In or Register to comment.