Sorting data in a document

A document's data is sorted according to its group settings, such as in page-bys. However, you may want to control its sort further. The order of the sort keys (the sort-by fields) is defined by the order of the groupings, as described in Grouping records in a document. You can sort based on objects from the primary dataset only.

For example, you may want to sort the information in the document's Detail section. If you have a document grouped by Region and Year, in the Detail section, you may want to sort the records by Revenue in descending order.

If sorting by custom group, you can choose from the following options:

You can also sort consolidations. If the object is a consolidation, an ascending sort displays the elements in the order in which they were defined. Descending order reverses that order.

For steps to sort grouping fields, see Sorting grouping fields.

To sort records in a document

  1. Open the document in Design or Editable Mode.

  2. From the Data menu, select Sort Document. The Sort Document dialog box opens.

  3. From the Sort by drop-down list in the Detail area, select the object to sort. The list contains all the objects in the primary dataset, regardless of where or whether they are placed on the document.

  4. Select Ascending or Descending for each object.

    Note: You cannot change the sort order if the criteria of an attribute is set to Default. You can change the order of a custom group only if you selected Sort on Attribute ID in the Criteria.

  5. You can also sort the grouping fields of the document.

  6. From the Then by drop-down lists, specify additional sort objects as necessary. These objects are sorted after the Sort By object.

  7. Click OK to apply the changes and return to the document.

Related topics