Sorting the data

Top  Previous  Next

By default, the "Data" band prints data in natural order. Often it is needed to sort the data before printing. For example, a list of customers can be comfortably presented by sorting it in an alphabetical order.

 

You can control sorting in the "Data" band editor. In order to call the editor, double click on a free space at the band:

 

dataBandSort

 

As a sort criteria, you can use either a data column or an expression. You can indicate several (not more than three) sorting conditions. This can be needed, for example, if you want to sort the list of customers by their cities, and after that, by customer's name. For each condition, you can choose the order of sorting - ascending or descending.

 

Another method of sorting data - use the SQL query as a data source. The query will be executed on the data server and return a sorted rows.