I need to calculate a running total for the attached statement. I did go through the steps on the tutorial that was posted on a previous ticket, but it doesn’t work - I assume it’s because it’s within a group and not a list.
Our Balance column should be the opening balance + debit + credit on each line, and the last line should correspond with the closing balance amount.
Explanation:
(1) Customer account statements can be printed for several customers, so there needs to be a List tagging element bound to Customer nodes. All Field tagging bindings need to be mapped to Current Data Context.
(2) I added a Var tagging before the Group tagging element. It will be used for calculating the running total. At this point I initialized it to zero.
(3) I then calculated the sum of debit and credit values for each invoice and added the result to the running total variable.
(4) The balance actually shows current running total result.
I hope that this is what you need.
Please find the template attached, but I encourage you to try to do it by yourself and just use my template for reference. 200x Statement editing template.docx (68.4 KB)