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

Re: dynamic loops



I use an old version of SQR and I've never really had to do this but
this might work...

let #LOOP_COUNTER = to_num($user_input_variable)
let #LOOP = 0

begin-select

columns

        ! other sqr statement

        if #LOOP < #LOOP_COUNTER
                ! increment loop counter
                add 1 to #LOOP
        else
                exit-select
        end-if

where ... etc.
order by ... etc.

end-select


===
Bob Foster
I/S Coordinator
Mid-Michigan MRI, Inc.
Direct Line: (517) 364-2673
mailto:rkf@radiology.msu.edu

> Date:    Mon, 16 Sep 2002 09:22:56 +0200
> From:    Aleksandra Polniak <opolniak@AIUT.COM.PL>
> Subject: dynamic loops
>
> Hello
>
> I am new to SQR, so forgive me if this is "stupid question" but I can't =
> find answer anywhere. I need to make a loop in my report in order to =
> print only at most X measurements. Parameter X should be taken from user =
> at runtime.=20
>
> Aleksandra Polniak