If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Can anyone recommend how to perform a running balance in a Grid application as a calculated field?
It's the sum of a column? And the column is a calculated field? (sorry if this is a stupid question). Within a row you can perform a script to calculate a new field by using a onrecord event. This will trigger for each and every column. This calculated column can be summed by using the summary and totals secion left in the menu.
Your idea is good but It calculate balance only for one page. It is not give running balance for all pages. If you put the [global_old]=0; in onApplicationinit instead of onScriptinit.it will calculate running sum for all pages. But this time the problem is the changing pages(prev, next navigation). It will calculate and add running total again and again without stopping. Therefore It gives wrong runnging balance.
I am thinking that how this will be solved ?
are you doing anything else with your data?
I have a grid with appr. 200 pages (50 records a page) and it is calculated from the first to the last page.
Try adding a ORDER BY balance to your SQL-Statement.