How to refer to summary items

Chris Sharman Chris.Sharman@ccagroup.co.uk
Fri, 10 Mar 2000 09:01:52 +0000


>PowerHouse 8.19C on HP3000 (MPE/iX)
>
>I have a subtotal with a bunch of items including three that are summary
>operations on the same field: AVERAGE, MINIMUM and MAXIMUM. I can access the
>subfile and print out this data with REPORT ALL.
>
>   Tot            Tot            Tot
>Elapsed   Elapsed   Elapsed
>(AVERAGE)       (MINIMUM)          (MAXIMUM)

Do you get the right value for average ? I understood that was written away as
a subtotal field and a count field, both with the same name.

>but how would I manipulate them, e.g, in a DEFIINE, in a REPORT GROUP, etc.?

if this is your Quiz code:

rep sum tot-elapsed ave tot-elapsed min tot-elapsed max

you should change it to:

def min-elapsed int*9 = tot-elapsed
def max-elapsed int*9 = tot-elapsed
def rcount int*9 = 1
rep sum tot-elapsed subt rcount subt min-elapsed min max-elapsed max
go
...
def ave-elapsed int*9 = tot-elapsed/rcount

If you were using QTP you can rename items (alias) as you write the subfile.

>My ultimate goal is to formate these fields into HH:MM so that the information
>is readable without the user needing to do the math. I can do this, with DEFINEs
>at the item level, but not for the summary level.

There's no difficulty with formatting min or max. You'd have to format average
and subtotal after calculation (ie in the post-summary pass), by the same
technique. The new-ish formatnumber function may be useful to you.

Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccastat.demon.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.