You sort a report using vertical (BY) and horizontal (ACROSS) phrases:
A request can include up to 128 sort phrases consisting of any combination of BY and ACROSS phrases.
The limit on the number of columns per ACROSS phrase is 1151, which is possible only with a single ACROSS phrase. The limit is based on the total number of columns allowed in a request. In the case of ACROSS, it is 1024 columns, plus 127 sort columns maximum. The total number of ACROSS columns is equal to the total number of ACROSS sort field values multiplied by the total number of display fields.
Additional sorting options include:
There are two ways that you can sort information, depending on the type of display command you use:
When you use the display commands PRINT and LIST, the report may generate several rows per sort value; specifically, one row for each occurrence of the display field. When you use the commands SUM and COUNT, the report generates one row for each unique set of sort values. For related information, see Sorting With Multiple Display Commands.
For details on all display commands, see Displaying Report Data.