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

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



The example just is to understand because procedure doesn't execute on
first time.

> ----- Mensagem original -----
> De:           Davi Cabral [SMTP:dcabral@RECSA.COM.BR]
> Enviada em:           Quarta-feira, 5 de Julho de 2000 19:51
> Para:         SQR-USERS@list.iex.net
> Assunto:              RES: Help !! I dont understanding on break in my
> report.
>
> For what a On-Break and a Procedure to a so simple query? Try a group by
> and simply write "Grupo" beside &codgrupo:
> Return me what happens.
> By the way, what SQR version are you using? Do you write the code manually
> or you have a graphic interface?
>
> Davi
>
> Begin-Program
>  Begin-Select
>   codgrupo
>   codproduto
>   produto
>    print   'Grupo'  (+1,1)
>    print   &codgrupo (,10)
>    print   &codproduto (,15)
>    print   &produto (,28)
>   next-listing
>  From  produtos
>  where  coddepartamento = 1
>  and codsecao =  8
>  and codclasse  = 168
>  group by codgrupo
>  order  by codgrupo
>  End-Select
> End-Program
>
>
>
>
> ----- Mensagem original -----
> De:             Ronaldo Delmar M. Fernandes [SMTP:ronaldo@ZAFFARI.COM.BR]
> Enviada em:             quarta-feira, 5 de julho de 2000 18:35
> Para:           SQR-USERS@list.iex.net
> Assunto:                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 ?