Suppressing Column Display

How to:

Reference:

A report request may include a field to create a certain result. For example, it may name a sort field by which to arrange data. However, you may not want to display the title or values of that field if they appear elsewhere in the report. The phrase NOPRINT (synonym SUP-PRINT) suppresses column display.

Reference: Column Suppression Commands

Command

Description

Applies to

NOPRINT or 
SUP-PRINT

Suppresses column display.

HTML

PDF

PS

Syntax: How to Suppress Column Display

display_command fieldname {NOPRINT|SUP-PRINT}

or

{ON|BY} fieldname {NOPRINT|SUP-PRINT}

where:

display_command

Is a display command.

fieldname

Is a display field or sort field. The field values are used but not displayed. A HOLD file will not contain the values of a suppressed BY field.

For a calculated value with NOPRINT, repeat AND COMPUTE before the next calculated value if applicable.

NOPRINT|SUP-PRINT

Suppresses column display. The terms are synonymous.

ON|BY

Is a vertical sort phrase. The terms are synonymous.

Example: Suppressing the Display of a Sort Field

This request sorts data by city. Since the page heading contains the name of the city, the sort field occurrence is suppressed.

TABLE FILE SALES
HEADING
"Page <TABPAGENO"
"SALES REPORT FOR <CITY"
PRINT UNIT_SOLD AND DELIVER_AMT 
BY CITY PAGE-BREAK NOPRINT 
BY PROD_CODE
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The page heading identifies the city to which the data applies:

Without NOPRINT, the report would unnecessarily repeat the city:

Example: Suppressing Display of a Sort Field With Subtotal

This request generates a subtotal for each value of the sort field CATEGORY but suppresses the display of the sort field occurrence.

TABLE FILE GGSALES
SUM UNITS BY CATEGORY
BY PRODUCT 
ON CATEGORY SUB-TOTAL SUP-PRINT PAGE-BREAK 
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The default subtotal line identifies each category (for example, *TOTAL Coffee):

Without SUP-PRINT, the report would unnecessarily repeat the category:

Example: Sorting Alphabetically

This request sorts last names alphabetically but avoids duplication of data by suppressing the sort field occurrence of LAST_NAME.

TABLE FILE EMPLOYEE
PRINT LAST_NAME 
BY LAST_NAME NOPRINT 
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

Last names are arranged alphabetically: