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.
{BY|ACROSS} sortfield {NOPRINT|SUP-PRINT}
where:
Is the name of the sort field.
You can use SUP-PRINT as a synonym for NOPRINT.
If you want to display a list of employee names sorted in alphabetical order, the following request is insufficient.
TABLE FILE EMPLOYEE PRINT LAST_NAME FIRST_NAME END
The output lists the names in the order that they were entered into the data source:
LAST_NAME FIRST_NAME --------- ---------- STEVENS ALFRED SMITH MARY JONES DIANE SMITH RICHARD BANNING JOHN IRVING JOAN ROMANS ANTHONY MCCOY JOHN BLACKWOOD ROSEMARIE MCKNIGHT ROGER GREENSPAN MARY CROSS BARBARA
To list the employee names in alphabetical order, you would sort the report by the LAST_NAME field and hide the sort field occurrence using the phrase NOPRINT.
TABLE FILE EMPLOYEE PRINT LAST_NAME FIRST_NAME BY LAST_NAME NOPRINT END
This request generates the desired output:
LAST_NAME FIRST_NAME --------- ---------- BANNING JOHN BLACKWOOD ROSEMARIE CROSS BARBARA GREENSPAN MARY IRVING JOAN JONES DIANE MCCOY JOHN MCKNIGHT ROGER ROMANS ANTHONY SMITH MARY SMITH RICHARD STEVENS ALFRED
Information Builders |