Overview
You may often use the sort function when displaying data or charts in FineReport reports. Generally, the sort function is widely used in data display and is not so much involved in chart display.
This document introduces various types and applications of the sort function supported by FineReport.
Introduction to Three Sort Methods
FineReport supports three types of sorts: sort in datasets, advanced sort, and sort after expansion. The following table describes specific content.

Comparison of Three Sort Methods
Performance Comparison
In terms of performance, sort in datasets is better than advanced sort, and advanced sort is better than sort after expansion.
Sort Type | Advantage | Disadvantage |
---|---|---|
This sort method boosts the best performance. | 1. All calculations must be performed in the database, causing complex SQL statements and difficult maintenance. Therefore, you are advised to use SQL statements to perform simple and single sorts (ascending/descending). 2. Some calculations cannot be completed through SQL statements. For example, if a column is calculated based on other data columns, sort in datasets will not be applicable. | |
This sort method has the average performance, allowing you to perform relatively complex sorts through formulas based on data columns. | Formulas must rely on data columns and the secondary calculations of formulas are caused. | |
This sort method is the most flexible one and can meet all sort needs currently. | It has the worst performance because sort is performed after expansion, which will adjust the positions of all cells. |
Applicable Scenario Comparison
In terms of the applicable scenario, sort after expansion is better than advanced sort and advanced sort is better than sort in datasets. Note: All these three sort methods can be used in dashboards and general reports.
Sort Type | Sortable Field | Achievable Effect |
---|---|---|
Time, date, character string, value, and boolean fields | The following effects can be achieved:
| |
![]() 1. Multi-column sort is supported in FineReport 11.0.3 and later versions. 2. Only the single-column sort can be achieved in FineReport earlier than 11.0.3. The following effects can be achieved:
| ||
1. Dynamic and multi-column sorts are supported in FineReport 11.0.3 and later versions. 2. The following effects can be achieved by the function itself:
3. The following effects can be achieved by the combination with other functions:
|