Consultor Eletrônico



Kbase 6088: How to do mailing labels 2 across
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to do mailing labels 2 across

DOS Single User,,,920617-41509,hjbThere are a couple of approaches that can be used to print labels
in 2- or 3-up format (2 or 3 across a page, or more). One example
is in the PROGRESS procedure library for Version6 and can be accessed
from the Help menu. The program to unpack is called mail-lbl.p

Alternatively, multiple buffers can be used for the record being
printed. This method is demonstrated by the following procedure
which can be run against the demo database. This procedure formats
data from three customer records on each line. If the first record
isn't found (end of file), nothing is printed. If the second or
third record isn't found, data will display only for the successful
read(s).

DEFINE BUFFER x FOR customer.
DEFINE BUFFER y FOR customer.
DEFINE VARIABLE i AS INTEGER INIT 0.
REPEAT:
FORM customer.cust-num x.cust-num y.cust-num WITH FRAME z NO-LABELS.
FIND FIRST customer WHERE customer.cust-num > i NO-LOCK NO-ERROR.
IF NOT AVAILABLE customer THEN LEAVE.
FIND FIRST x WHERE x.cust-num > customer.cust-num NO-LOCK NO-ERROR.
IF NOT AVAILABLE x THEN DO:
DISPLAY customer.cust-num WITH FRAME z.
LEAVE.
END.
FIND FIRST y WHERE y.cust-num > x.cust-num NO-LOCK NO-ERROR.
IF NOT AVAILABLE y THEN DO:
DISPLAY customer.cust-num x.cust-num WITH FRAME z.
LEAVE.
END.
DISPLAY customer.cust-num x.cust-num y.cust-num WITH FRAME z DOWN.
i = y.cust-num.
END.

Progress Software Technical Support Note # 6088