I am trying to customize a trial balance report in nav 2015 so I bring overall total at the end of the report on both credit and debit for Net change and balance headings.
Does anyone have a way to make that happen cos when I try it does not display what a I want.
This goal can be achieved if you follow these steps:
- Add new variables like
CreditNetChange; Decimal and DebitNetChange; Decimal
CreditBalChange; Decimal and DebitBalChange; Decimal
- Add code to to G/L Account - OnAfterGetRecord() trigger that adds amounts to these variables according to G/L Account type and Debit/Credit value
- Add a new DataItem with these variables as columns into the report.
- Add the new Dataitem to the layout.
I do not know the reason for this calculation other than a nice programming practical work, since it has little or no use in real life reporting.
For correct values, you should do the calculations with Analysis Views. The brute summing up Net change and Balance change is not very informative, since one transaction can be posted to multiple G/L Accounts at once.