[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Print Question
>How do you print a title at the middle of report by using sub-query? What I
>want is to print a sub-title one time for a set of records. If I put print
>statement before end-select then if no record selected, it prints title.
>That I don't want to happen. If I put print statement in the middle of
>sub-query then it prints title for each record printed. Any help is
>appreciated. Thanks.
You can do something like
let #first_time = 1
begin-select
...
if #first_time
print 'Title Stuff' (x,y)
let #first_time = 0
end-if
...
from table
or use the ON-BREAK format command in PRINT
begin-select
'constant_text' &zzz () on-break level=1 before=print_title print=never
column_name1
column_name2
...
print &column_name1 (+1,1)
...
begin-procedure print_title
print 'Title Stuff' (x,y)
end-procedure
Andrew
--------------------------------------------------------
Andrew Barnett abarnett@isd.hih.com.au
- Wizzard
--------------------------------------------------------