How to: Reference: |
You can create reports that do not display the values or titles of fields, but only use those fields to produce specific effects. FOCUS provides options to suppress the printing of field values: NOPRINT and SUP-PRINT.
display fieldname {SUP-PRINT|NOPRINT} {ON|BY} fieldname {SUP-PRINT|NOPRINT}
where:
Is any display command.
Is a sort field or display field. The values of the field may be used, but they are not displayed.
BY DEPARTMENT NOPRINT
results in a HOLD file that does not contain the DEPARTMENT field.
To print a list of employee names in alphabetical order, if you simply use the request
TABLE FILE EMPLOYEE PRINT LAST_NAME END
you get a report that lists the last names of employees in the order they were entered into the data source:
LAST_NAME --------- STEVENS SMITH JONES SMITH BANNING IRVING ROMANS MCCOY BLACKWOOD MCKNIGHT GREENSPAN CROSS
To print the last names in alphabetical order, use NOPRINT in conjunction with a BY phrase:
TABLE FILE EMPLOYEE PRINT LAST_NAME BY LAST_NAME NOPRINT END
which produces the desired result:
LAST_NAME --------- BANNING BLACKWOOD CROSS GREENSPAN IRVING JONES MCCOY MCKNIGHT ROMANS SMITH SMITH STEVENS
Consider the following example, where the report is sorted, but the field that determines the sort order is not displayed:
TABLE FILE SALES PRINT UNIT_SOLD AND DELIVER_AMT BY CITY BY PROD_CODE BY RETAIL_PRICE ON RETAIL_PRICE SUP-PRINT END
The output is:
CITY PROD_CODE UNIT_SOLD DELIVER_AMT ---- --------- --------- ----------- NEW YORK B10 30 30 B17 20 40 B20 15 30 C17 12 10 D12 20 30 E1 30 25 E3 35 25 NEWARK B10 13 30 B12 29 30 STAMFORD B10 60 80 B12 40 20 B17 29 30 C13 25 30 C7 45 50 D12 27 40 E2 80 100 E3 70 80 UNIONDALE B20 25 40 C7 40 40
Also, consider the following example which does not display a COUNTRY column:
TABLE FILE CAR SUM SALES BY COUNTRY BY CAR ON COUNTRY SUB-TOTAL SUP-PRINT PAGE-BREAK END
The first part of the output is:
PAGE 1 CAR SALES --- ----- JAGUAR 12000 JENSEN 0 TRIUMPH 0 *TOTAL ENGLAND 12000 PAGE 2 CAR SALES --- ----- PEUGEOT 0 *TOTAL FRANCE 0 PAGE 3 CAR SALES --- ----- ALFA ROMEO 30200 MASERATI 0 *TOTAL ITALY 30200
Information Builders |