Hiding Sort Values

How to:

When you sort a report, you can omit the sort field value itself from the report by using the phrase NOPRINT. This can be helpful in several situations; for instance, when you use the same field as a sort field and a display field, or when you want to sort by a field but not display its values in the report output.

Syntax: How to Hide Sort Values

{BY|ACROSS} sortfield {NOPRINT|SUP-PRINT}

where:

sortfield

Is the name of the sort field.

You can use SUP-PRINT as a synonym for NOPRINT.

Example: Hiding Sort Values

If you want to display a list of employees sorted by the date on which they were hired, but you want the report to contain last name, first name, and then the hire date in the third column, the following request is insufficient.

TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME HIRE_DATE
END

The output is:

To list the employees in the order in which they were hired, you would sort the report by the HIRE_DATE field and hide the sort field occurrence using the NOPRINT phrase.

TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME HIRE_DATE
BY HIRE_DATE NOPRINT
END

The output is: