DefaultSorting

As the name suggests, DefaultSorting is used to define the default column upon which to sort when the report is first displayed. (The end-user can opt to choose a different sort column later.)

DefaultSorting supports the following child elements:

  • SortByColumnName—the name of the column (not field) to be sorted.

  • SortDirection—either ASC or DESC, representing ascending and descending order respectively. When omitted, ASC is assumed.

    ...
    </Retrieval>
    <DefaultSorting>
    <SortByColumnName>SHIPMENT_NO</SortByColumnName>
    <SortDirection>DESC</SortDirection>
    </DefaultSorting>
     
    </Report>

When no DefaultSorting is provided, the default sort order is determined by whatever ORDER BY clause is in the Report SQL query. If there is no ORDER BY clause, ordering is non-deterministic.