Adding running total to one of list pages is really simple. Lets consider table Balance with fields ID and Amount.
1.Modify SQL query adding a calculated Total field:
SELECT ID, Amount, 0 as Total from Balance
2. Events Editor, Balance table: BeforeProcessList event:
We are going to accumulate the current total amount in session variable SESSION("Total"). This variable needs to be reset when page is loaded.
3. 'Total' field in Visual Editor. Set 'View as' type to 'Custom' and use the following code:
SESSION("Total") = SESSION("Total") + CSmartDbl(data("Amount")) strValue = SESSION("Total")
This is it. Here is how it looks in live application.