Hi
I am having a right dumb moment but cant get this to work.
I have quote a complex sql statement doing a union on 2 tables of invoices and payments to produce me a nice statement of account. a bit like a bank statement, i display these rows in a repeat, that all works really nicely, but, i want the final column to be a running total, i.e it starts at 0, an invoice is issued for 10 so the final column has 10, then a payment of 10 comes in so its back to 0, like a bank statment, i cannot do this in the sql with the union so want to do it as a variable in the repeat.
so i set a variable at the top of my code varBalance and set it to 0.
then in the repeat I am trying to simply do varBalance = varBalance + Payment - Invoice which should give me the running total
in the repeat I have this
<dmx-value id="varBalance" varBalance.setValue={{varBalance.value-rowtotal}}></dmx-value>
i have tried all sorts of comments and searched to death and reads loads of forum posts but none the wiser.
thanks if anyone knows how to reset the variable in the repeat, many thanks in advance