[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: ONBREAK--TOTALS



i just got the book
"SQR in PeopleSoft and other applications"
and it actually has a whole chapter devoted to the topic of on-break logic.
definately worth a look, and i can highly recommend the book (already!
and i've not even owned it twenty four hours.)

(kris)janis p. gale
hrsd - federal reserve bank of new york
x8163

>>> DON PINKUS <donpinkus@HOTMAIL.COM> Thursday, July 15, 1999 8:01:14 PM >>>
Thank you RAY


>From: Ray Ontko <rayo@ONTKO.COM>
>Reply-To: SQR-USERS@list.iex.net 
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>Subject: Re: ONBREAK--TOTALS
>Date: Mon, 28 Jun 1999 21:59:25 -0500
>
>Don,
>
>Here's a simple program showing a single-level on-break.
>
>Ray
>
>    begin-program
>    do main
>    end-program
>
>    begin-procedure main
>    move 0 to #total
>    begin-select
>    item_type &item_type (1,1) on-break
>       level=1 before=before_item_type after=after_item_type
>    xref_amt &xref_amt (,11) edit 99,999
>       add &xref_amt to #item_type_subtotal
>       add &xref_amt to #total
>       next-listing
>    from item
>    order by item_type
>    end-select
>    print 'Total' (1,1)
>    print #total (,11) edit 99,999
>    end-procedure
>
>    begin-procedure before_item_type
>    move 0 to #item_type_subtotal
>    end-procedure
>
>    begin-procedure after_item_type
>    print 'Subtotal' (1,1)
>    print #item_type_subtotal (,11) edit 99,999
>    next-listing skiplines=1
>    end-procedure
>
>Here's the output:
>
>    A              3
>                   7
>                   2
>    Subtotal      12
>
>    B              6
>                   9
>    Subtotal      15
>
>    C             32
>                   6
>    Subtotal      38
>
>    Total         65
>
> > DOES ANY ONE HELP ME IN TOTALING FOR ONBREAK
> >
> > eg:
> >
> >
> >   item_types    xref_amt
> >
> >       A           $3
> >       A           $7
> >       A           $2
> >       B           $6
> >       B           $9
> >       C           $32
> >       C           $6
> > I need to know the sub-totals for each item_types(A,B,C) on-break
> > and grand totals for all item_types
> >
> >   thanks in advance
> >
> >
> > _______________________________________________________________
> > Get Free Email and Do More On The Web. Visit http://www.msn.com 
> >
>
>----------------------------------------------------------------------
>Ray Ontko       |  Ray Ontko & Co  |  "RO&C: data movers and shakers."
>rayo@ontko.com  |  Richmond, In    |  See us at http://www.ontko.com/ 


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com