Jump to content


Photo
- - - - -

Running totals in Paging screen


6 replies to this topic

#1 luken

luken

    Member

  • Members
  • PipPip
  • 18 posts
  • Gender:Male

Posted 23 November 2004 - 08:05 PM

I've been working with Pro-iv for many years now. Every time I have to maintain of create running totals in a paging screen, I feel like I'm going to have an Involuntary bowl movement !!

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.

:(

#2 Lewis Mccabe

Lewis Mccabe

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 455 posts
  • Gender:Male
  • Location:Sarasota, Florida

Posted 24 November 2004 - 06:25 AM

If you are in a green screen environment, use a separate LS to print your running totals. Calculate them in before write logic and then call the "print totals LS". This method is not supported in GUI environments. If you moved to version 5.5 (not a difficult migration from the version you are on) you would be able to do this simply by using the refresh property. You would do your calculations in before write and then print them to the screen.

Lew

#3 luken

luken

    Member

  • Members
  • PipPip
  • 18 posts
  • Gender:Male

Posted 24 November 2004 - 08:28 AM

Thanks for the help. :(

#4 luken

luken

    Member

  • Members
  • PipPip
  • 18 posts
  • Gender:Male

Posted 24 November 2004 - 08:33 AM

How would you use the Refresh property, and what does it do ? Would you include the Running totals in your paging LS?

#5 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 24 November 2004 - 10:32 AM

Use the Refresh property :(

#6 Mike Schoen

Mike Schoen

    Expert

  • Members
  • PipPipPipPip
  • 198 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 24 November 2004 - 01:57 PM

We do this by maintaining two actuall running totals:
#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.

#7 Lewis Mccabe

Lewis Mccabe

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 455 posts
  • Gender:Male
  • Location:Sarasota, Florida

Posted 24 November 2004 - 03:29 PM

The refresh property permits you to redisplay a field or header value on demand without having to do any field jumps or calling of any LS's.

Lew



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users