[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Page Break
With SQR version 3, you can declare multiple report formats in the
same SQR program and then use the input from the user to decide which
output format to produce. It would even be possible to produce both
output formats during the same data selection if the program is coded
correctly. For example:
begin-setup
declare-layout labels
paper-size=(8.5,2) ! values are in inches
formfeed=no
end-declare
declare-layout list
paper-size=(8.5,11) ! values are in inches
end-declare
declare-report labels
layout=labels
end-declare
declare-report list
layout=list
end-declare
end-setup
begin-program
input $option 'Enter LIST or LABEL '
evaluate $option
when = 'LIST'
use-report list
do list_query
when = 'LABEL'
use-report labels
do label_query
end-evaluate
...
end-program
John L. Kellogg
MITI Technical Support Manager
______________________________ Reply Separator _________________________________
Subject: Page Break
Author: usa.net!SQR-USERS@netcomsv.netcom.com at Internet
Date: 21/02/96 10:07 AM
Hi SQRers:
I might confused you with my previous help message. This is more clear I think.
I writing a program with combination of listing and labels. There is a
parameter option for user to choose either producing listing or labels. The
problem is page breaking. If listing, I want to have a page break at 55 lines.
If labes then do not do page break. If I put 'no-formfeed' command at
BEGIN-SETUP then listing will not do a page break. Without 'no-formfeed'
command, labels will do page break after each label print.
Here is an example:
!-------------------------------------------
BEGIN-SETUP
page-size {numlines} 133
no-formfeed
END-SETUP
!-------------------------------------------
BEGIN-PROCEDURE start-up
input $option 'Enter LIST or LABEL '
evaluate $option
when = 'LIST'
#define numlines 55
do list_query
break
when = 'LABEL'
#define numlines 6
do label_query
break
end-evaluate
END-PROCEDURE
!-------------------------------------------
BEGIN-PROCEDURE list_query
begin-select
spriden_id &id
...
from ...
where ...
print &id (+1,1)
...
if (#current-line = 55) ! Do page break at 55 lines for listing.
new-page ! Since 'no-formfeed' at BEGIN-SETUP, it won't
end-if ! do form feed here ???
end-select
END-PROCEDURE
!-------------------------------------------
BEGIN-PROCEDURE labe_query
columns 1 35 69 103
begin-select
spvadds_street_line1 &ad1
...
from ...
where ...
print &ad1 (+1,1) ! Do not do page break for labels.
...
next-column
end-select
END-PROCEDURE
Please show me how to control page break as above example. Thank you for your
help.
Ben.
___________________________________________________________________________
Benjamin Le Voice: (503)-977-4970
Portland Community College, Information Technology Fax : (503)-977-4987
P.O. Box 19000, Portland, Oregon 97280-0990 Internet: ble@pcc.edu
___________________________________________________________________________