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

Re: Help !! I dont understanding on break in my report.



Kathy's answer is correct.

Use the 'Before' procedure to print group headings.

This way you will have a group heading for each group encountered
during the run instead of only when the group
has changed.

The Manning Press book SQR FOR PEOPLESOFT AND OTHER APPLICATIONS
has a nice example of this logic.

Regards,

Dave

----------------------------------------------------------

>--- Original Message ---
>From: Kathy Anderson <AndersoK@ROTARYINTL.ORG>
>To: SQR-USERS@list.iex.net
>Date: 7/5/00 9:56:49 PM
>

>The "procedure" option with On-break is like an "After" option
(I think).
>The procedure will only kick off after the value changes.  Maybe
you should
>try the "before" option instead.
>
>        Begin-Program
>        Begin-Select
>        codgrupo
>        codproduto
>        produto
>                        print   &codgrupo               (,10)
  On-Break
>before =q_grupo
>                        print   &codproduto     (,15)
>                        print   &produto        (,28)
>
>                        next-listing
>
>        From    produtos
>        where   coddepartamento         =       1
>        and             codsecao        =       8
>        and             codclasse               =       168
>        order           by codgrupo
>        End-Select
>        End-Program
>
>
>
>> -----Original Message-----
>> From: Ronaldo Delmar M. Fernandes [SMTP:ronaldo@ZAFFARI.COM.BR]
>> Sent: 5 July 2000 4:35 PM
>> To:   SQR-USERS@list.iex.net
>> Subject:      Help !! I dont understanding on break in my
report.
>>
>> look the follow code.
>>
>> Begin-Program
>> Begin-Select
>> codgrupo
>> codproduto
>> produto
>>                 print   &codgrupo               (,10)   On-Break
procedure
>> =
>> q_grupo
>>                 print   &codproduto     (,15)
>>                 print   &produto        (,28)
>>
>>                 next-listing
>>
>> From    produtos
>> where   coddepartamento         =       1
>> and             codsecao        =       8
>> and             codclasse               =       168
>> order           by codgrupo
>> End-Select
>> End-Program
>>
>> begin-procedure q_grupo
>>         print   'Grupo'         (+1,1)
>> end-procedure
>>
>> and look the result
>>
>>         1       189             cerveja tipo1
>>                 502             cerveja brahma
>>                 924             cerveja skol
>>                 1223            cerveja polar
>>
>> grupo   5       242105          cerveja nortenha
>>                 6423            cerveja itaipava
>>
>> grupo   10      131484          cerveja kroneibier
>>                 2368            cerveja tipo 2
>>                 4525            cerveja tipo 3
>>                 1568            cerveja tipo 99
>>
>>
>> why in the first time the string grupo not printed if &codgrupo
printed ?
>
>
----------------
Sent from a WebBox - http://www.webbox.com
FREE Web based Email, Files, Bookmarks, Calendar, People and
Great Ways to Share them with Others!