You can define the Detail fill‑in to produce multiple detail lines. Assume a report is generated that lists all orders for each customer. On the Detail fill‑in, the information for customers prints on one line and the order number and date print on the next line. These two lines comprise one detail. A blank line is inserted between each line. The Detail fill‑in is specified as shown in the following example:
=> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ IDEAL : RPT DETAIL DEFN. RPT CUSTRPT (001) TEST SYS: DOC DISP Field Name, Literal, Sort Break Function Column Function, or L A L S I T M M A H W Command Arithmetic Expression V / V K N O A I V D ID Tab Edit Pattern L D L P D T X N G G TH ‑‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑‑ ‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑ ====== =========== T O P ======= = = = = = = = = = = == === ============= 000400 CUSTOMER.CUSTID _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000500 CUSTOMER.NAME _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000600 CUSTOMER.CITY _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000700 CUSTOMER.STATE _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000800 CUSTOMER.ZIP _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000900 _ _ _ _ _ _ _ _ _ _ __ L01 _____________ 001000 ORDER.ORDID _ _ _ _ _ _ _ _ _ _ __ 008 _____________ 001100 $DATE('MM/DD/YY',; _ _ _ _ _ _ _ _ _ _ 08 +04 _____________ 001200 DATE=ORDDT,TEM='YYMMDD') _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 001300 _ _ _ _ _ _ _ _ _ _ __ L01 _____________ ====== ========= B O T T O M === = = = = = = = = = = == === =============
Notice the TAB value of 008 for the ORDER.ORDID field. This specification places the field at column 8 of the report, which moves the field to the next physical line. (Assume that one space is inserted between fields, and headings do not print.)
The following PDL code generates this report:
FOR EACH CUSTOMER
FOR EACH ORDER
WHERE ORDER.CUSTID EQ CUSTOMER.CUSTID
PRODUCE CUSTRPT
ENDFOR
ENDFOR
The following report shows the resulting report, with customer information printed for each order. Notice that there are two entries for customer A0130.
A0130 SUN DIAL CITRUS GROWERS LOS ANGELES CA 902130050 1021 11/08/93 A0130 SUN DIAL CITRUS GROWERS LOS ANGELES CA 902130050 1024 01/04/94 A0150 IMPERIAL BANKCORP NEW YORK NY 100190000 1023 12/24/93 B0230 CHEMICAL MUTUAL FORT WORTH TX 761026102 1013 11/05/94 . . .
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|