Add an attribute AccumulatedBal to Stmt(*1), default value 0. Create a microflow with Data as input parameter. Then in your microflow:
Save this microflow as DS_Stmt_ByData_SortedAndAccumulated.
Now on your page add a Datagrid ( or listview, or datagrid2, whatever spits your needs best) and set this microflow as datasource.
*1: this attribute on Stmt or on Data? on Data it will give you one number only, the current balance. On Stmt it gives you the balance aftershave each statement.
*2: Recalculate every time or only upon saving a new statement. Recalculation is only needed if you have not filled the AccumulatedBal before. Once that attribute is filled for every stmt, go with an update upon saving each New stst.
Are you planning to have the AccumulatedBal attribute on Data entity?
if So, the easiest way todo is recalculating this value on the Event After Commit / Delete of the Stmt entity. Or calling a MF ACT_Data_RecalcBalance ...
All you have todo is:
Hope this helps