Page 1 of 1

Running Balance

Posted: Fri Sep 06, 2013 11:55 pm
by starquest321

I have the following structure:

Charge|Payment|Balance

All coming from the database. But I need to create a running balance. . . now what I have is a line item balance:

Charge: 100| Payment: 0 | Balance: 100
Charge: 0 | Payment: 10| Balance: -10
Charge: 50 | Payment: 0| Balance: -50
Charge: 0 | Payment: 10| Balance: -10

I need the running balance for these entries to appear. So:
Charge: 100| Payment: 0 | Balance: 100 | Running: -100
Charge: 0 | Payment: 10| Balance: -10 | Running: 90
Charge: 50 | Payment: 0| Balance: -50| Running: 140
Charge: 0 | Payment: 10| Balance: -10 | Running: 130


Re: Running Balance

Posted: Sat Sep 07, 2013 9:29 am
by Webmaster

Create a database view to add the additional field, then use Row_Rendered event to calculate and set the ViewValue of the field. (Use session or global variable for the running balance.)