Sorting Data

Sort Detail Data

To sort a report's data against single or multiple data columns, add it to the DetailBand's Sort Fields collection of a report's Detail band. There are two ways of doing this. The simplest way to sort a report's data is to employ the Group and Sort panel as shown below:

Another approach is to access the Detail band's Sort Fields collection via the band's actions list (by clicking the band's smart tag). In this actions list, click the ellipsis button (...) for the Detail Band's Sort Fields property.

After the GroupField Collection Editor is invoked, you can create multiple sorting criteria and define a sorting direction (ascending or descending) for each criteria. You can also sort by calculated fields.

Sort Groups

You can also sort a report's groups by the result of a summary function.

Sorting Groups by a Standard Summary Function Result

To do this, define a GroupSortingSummary object returned by the GroupHeaderBand's Sorting Summary property of a GroupHeaderBand.

The following will sort groups according to how many items are in the group.