Purpose
You can use the PRINT statement to override standard column headings and to specify a one- or two-line report heading to appear at the top of the report.
Syntax Diagram
The following syntax shows the PRINT statement with keywords that add a report title and column headings.
►►─ PRINT ─┬────────────────────────────────────┬─────────────────────────────► └─┬─ TITLE1 ─┬─ ' report-heading1 ' ─┘ └─ TITLE ──┘ ►─┬────────────────────────────┬─┬────────┬──────────────────────────────────► └─ TITLE2 'report-heading2' ─┘ └─ FROM ─┘ ►─┬─────────────────────────────┬─┬─────┬─┬─ key-name ────┬─┬─────┬──────────► └─ table-name ─┬────────────┬─┘ └─ ( ─┘ └─ column-name ─┘ └─ ) ─┘ └─ (status) ─┘ ►─┬─────────────────────────────────┬─┬──────────────────────────┬───────────►◄ └─ 'heading1 ─┬─────────────┬─ ' ─┘ └─ PICture 'edit-pattern' ─┘ └─ /heading2 ─┘
Explanation
The following explains the keywords for headings in the preceding PRINT format.
Specifies the only line of the report heading. The maximum length of the report heading is 55 characters. When using this option, enclose the specified heading in apostrophes (').
Specifies the first line of the report heading. The maximum length of the report heading is 55 characters. When using this option, enclose the specified heading in apostrophes (').
Specifies the second line of the report heading. The maximum length of the report heading is 55 characters. When using this option, enclose the specified heading within apostrophes (').
Assigns an alternate one- or two-line column heading name for the preceding column or key. A heading name can be up to 32 characters, including blanks, and must appear within apostrophes ('). If you do not specify a heading name, CA Dataquery prints an alternate heading which it finds in Datadictionary, if your site management selected that choice as a system option; otherwise, CA Dataquery prints the Datadictionary name of the column or key. A column heading can be two lines long, with each line separated by a heading separator character. See the System Profile Topic Help to determine which character is used at your site as a heading separator.
See PICTURE Clause for information about PICTURE clauses.
Example
An example illustrating these options follows:
FIND 10 CAI-SLSHST-REC ROWS
WITH SHIP-QTY > 100
RELATED BY SLMN-ID TO CAI-ORDERS-REC
PRINT FROM CAI-ORDERS-REC ORD-ID 'ORDER\NUMBER'
FROM CAI-SLSHST-REC ITM-ID 'ITEM\NUMBER'
SHIP-QTY 'QUANTITY\ORDERED'
UNIT-PRICE 'PRICE PER ITEM'
TITLE1 'LARGE ORDERS'
The title for your report is LARGE ORDERS. The report contains the order number identifying the customer, and the items ordered, how many were ordered and the cost per item.
Output
The output for the preceding query appears below.
=> 01/01/2010 CA Dataquery PAGE 1 15:30:19 LARGE ORDERS DETAIL ORDER NUMBER ITEM NUMBER QUANTITY ORDERED PRICE PER ITEM ------------ ----------- ---------------- -------------- 08811 O50006 0000203 00014.75 -------------------------------- LAST PAGE ------------------------------------ <PF1> HELP <PF2> RETURN <PF3> TOTALS ONLY <PF4> DETAIL <PF5> NO TOTALS <PF6> STATS <PF7> BACKWARD <PF8> FORWARD <PF9> NOT USED <PF10> NOT USED <PF11> LEFT <PF12> RIGHT
|
Copyright © 2014 CA.
All rights reserved.
|
|