Running totals in Paging screen
Posted 23 November 2004 - 08:05 PM
I'm running Pro-iv 50r100 at one of my clients.
If you look at a standard Ordering screen, the running totals are the sum of the order lines. I'm defining my running totals as the last fields in my paging screen. Add mode is fine as I just add the current line totals into the Running Total fields.
Change mode I store the totals of the current Order line into # variables before I change the order line and then I total the new order line totals less the saved ones (in my # variables) to my running totals.
Delete mode is the bugger, the timimg cycle runs through all the Before and After field logics when you press F3 to get you out of Add mode so that you can press F7 to delete. So if you are accumulating or totalling up the current line into the running totals, this logic fly through messes up the rolling totals. Delete mode jumps straight to before write of the driving table.
There has surely got to be a simplier way to work with these running totals. If you can flag numeric fields in Report functions as Verticle totals, why can't/has'nt Pro-iv build similar functionality into paging screens.
Posted 24 November 2004 - 06:25 AM
Posted 24 November 2004 - 01:57 PM
#order_total is the actual running total
#order_tot is displayed on the screen
read no error logic saves current order detail amount, after field logic calculates #order_tot = #order_total - saved + new amt
before write logic, depending on mode update order_total as required.
that way #order_total is right, and #order_tot is always updated correctly.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users