Finished Reports can sort grouped results by a calculated summary value instead of the group field itself.
For example, a report grouped by Client would normally sort the clients by their Client value. Using Sorting Summary, the report can instead order the clients by their total account balance, highest to lowest.
Before You Begin
Before configuring a Sorting Summary:
- Open the VDM View containing the required data.
- Click Run View to populate the results.
- Open the Finished Reports Designer.
- Confirm that the report contains the group you want to sort.
Sorting Summary applies to a Group Header. If the report contains multiple groups, select the Group Header for the level you want to reorder.
Select the Group Header associated with the groups you want to sort.
How Sorting Summary Works
Sorting Summary calculates a selected field for every group and then uses the calculated results to determine the group order.
The configuration includes:
- Field — The field used to calculate the sorting value.
- Summary function — The calculation performed for each group.
- Sort order — Whether the calculated results are ordered from lowest to highest or highest to lowest.
- Ignore null values — Excludes null values from the calculation when enabled.
Common summary functions include:
- Average
- Count
- Maximum
- Median
- Minimum
- Sum
- Variance
- Population Variance
- Standard Deviation
- Distinct versions of supported functions
- Custom
The available functions can vary depending on the selected field and report configuration.
Step 1: Open Group Header Tasks
Select the applicable Group Header in the report.
Open Group Header Tasks by clicking the Group Header’s smart-tag button.
The Group Header Tasks panel includes the Sorting Summary setting.
Open Group Header Tasks to access the Sorting Summary setting.
Step 2: Open the Group Sorting Summary Editor
Click the ellipsis button next to Sorting Summary.
The Group Sorting Summary Editor opens.
Select Enabled to turn on summary-based sorting for the group.
Step 3: Configure the Sorting Summary
Configure the following settings:
- Select Enabled.
- Under Field, select the field whose values should determine the group order.
- Under Summary function, select the calculation to perform for each group.
- Under Sort order, select:
- Ascending to display the lowest calculated value first.
- Descending to display the highest calculated value first.
- If needed, select Ignore null values.
- Click OK.
In the recorded example, the report uses:
| Setting | Selection |
|---|---|
| Group field | Client |
| Summary field | Account_Balance |
| Summary function | Sum |
| Sort order | Descending |
This configuration places the Client with the highest total Account Balance first.
The preview area on the right side of the editor displays sample field values. The value below the line represents the result of the selected summary function.
This example sorts Client groups by the sum of Account_Balance, from highest to lowest.
Step 4: Preview the Report
Select Preview to review the finished report.
Confirm that:
- Every group still displays the expected records.
- The groups are ordered by the calculated summary value.
- Ascending places the lowest value first.
- Descending places the highest value first.
- Null values are handled as expected.
In the example, the Client groups appear in descending order according to their total Account Balance.
The Client groups are ordered by total Account Balance instead of by the Client value.
Change or Remove the Sorting Summary
To modify the group order:
- Return to Designer.
- Select the Group Header.
- Open Group Header Tasks.
- Open Sorting Summary.
- Change the field, summary function, or sort order.
- Click OK and preview the report again.
To stop sorting by a summary value, clear Enabled in the Group Sorting Summary Editor.
Save the Report
After verifying the results:
- Return to Designer.
- Click Save.
- Save the VDM View if additional View changes were made.
Example Uses
Sorting Summary can be used to display:
- Clients ranked by total account balance
- Sales representatives ranked by total revenue
- Products ranked by quantity sold
- Departments ranked by record count
- Regions ranked by average transaction amount
- Customers ranked by their highest invoice amount
Comments
0 comments
Please sign in to leave a comment.