Version 2021

Sorting dialog box

The Sorting dialog box allows you to set the data on a specific column or row in either ascending or descending order on a grid report. If the report is paged, you can sort how the pages are displayed in the drop-down list of pages. You can select what objects to sort, the sorting order, the sorting criteria (for example, the attribute form on which to sort), and the position of the totals.

Contents of the Sorting dialog box

The Sorting dialog box contains the following tabs, which all work similarly:

  • Rows, to sort the report based on any report object that is on a row

  • Columns, to sort the report based on any report object that is on a column

  • Pages, to sort the page-by fields based on any report object that is used as a page

If you have not already defined the sorts, the first time that you access this dialog box it is empty. Depending on the location of the object to be sorted, choose the Rows, Columns, or Pages tab, and then click Add. The Currently defined sorts area is populated with an object from a row, column, or page of your report. To change the selected object, click in the Sort By cell and a drop-down menu appears. Choose the desired object from the menu, which lists only the objects that appear in a row, column, or page of your report.

You can also change the Order, Criteria, Total Position, and Parent Position for each object by clicking in the appropriate cell. These options are described below. Each tab contains the same options.

  • Criteria:

  • If you are sorting on an attribute, you can choose which attribute form to sort on. The form does not have to be displayed on the report.

  • To determine the sorting criteria for a metric, the report must be in Grid mode. You can then choose which metric to sort on.

    In Design mode/Report Editor, you cannot change the criteria for a metric.

  • If you are sorting on a custom group, you can select whether to sort (by default custom groups are not sorted), to sort on attribute IDs, or to inherit the attribute's sort. Inheriting uses the default sort of the attribute form set to display first. SeeNew Attribute Form dialog box: Definition tabfor more information on setting the default sort.

  • Order: You can sort a row or column of data, or the page list, in ascending or descending order. An ascending sort orders the data from smallest to largest, such as A - Z and 1 - 10. If you choose descending order, the data appears from largest to smallest, such as Z - A, and 10 - 1.

  • Total position: You can determine where subtotals appear in a sorted row, column, or page list:

    • For rows, the Total position options are:

      • Bottom, which positions the subtotal at the bottom of the report

      • Top, which positions the subtotal at the top of the report

      • Inherit, which positions the subtotal as defined in the Subtotals dialog box

      • Mixed (available only if you are sorting by a metric), which sorts the subtotal amounts with the other metric values, instead of placing the subtotals together

    • For columns, the Total position options are:

      • Right, which positions the subtotal to the right of the report

      • Left, which positions the subtotal to the left of the report

      • Inherit, which positions the subtotal as defined in the Subtotals dialog box

      • Mixed (available only if you are sorting by a metric), which sorts the subtotal amounts with the other metric values, instead of placing the subtotals together

    • For pages, the Total position options are:

      • Bottom, which positions the Total page at the bottom of the page list

      • Top, which positions the Total page at the top of the page list

      • Inherit, which positions the Total page as defined in the Subtotals dialog box

        If subtotals have not been enabled for a custom group, this option is unavailable when sorting by the custom group.

  • Parent Position: This option is available only for custom groups. It is the position of the element headers relative to the child elements. For example, a header could be All Age Groups, while the child elements are Children, Teenagers, 20-29, and so on. The choices are:

    • Default, which reads the position from the custom group definition

    • Top, which places the header above the children

    • Bottom, which places the header below the children

  • Sort metrics hierarchically: This option is available only when a metric is included in the Currently defined sorts area. It allows you to select which of the metric's subtotals to use for the sort. If the property is not set, the default metric total is used. For instructions, refer to Advanced sorting: hierarchical sorting.

    If you select Sort metric hierarchically, you cannot specify the subtotal position by rows, because hierarchical metric sorting takes precedence over subtotal display. (Subtotal display is specified in the Subtotals dialog box.) To display subtotals at the top or bottom of the level when metrics are sorted hierarchically, specify the Total position (see above). For more detailed instructions, see Advanced sorting: hierarchical sorting.

To add additional sorts, click Add again. To remove a sort, select the sort to delete and click Remove. To remove all the sorts on a tab, click Remove All.

The up and down arrows allow you to change the order in which the objects are sorted, if you have multiple objects listed (that is, a hierarchical sort).

Accessing the Sorting dialog box

From the Data menu of the Report Viewer, Report Editor, or Template Editor, select Advanced Sorting.

To determine the sorting criteria for a metric, the report must be in Grid mode. You can then choose which metric you want to sort on. You cannot change the criteria in Design mode for a metric.

Related Topics