ActiveReports 9 > ActiveReports User Guide > How To > Section Report How To > Work with Data in Section Reports > Add Grouping in Section Reports |
In a section report, you can set grouping on a field or a field expression. Use the following steps to understand grouping in a section report.
These steps assume that you have already added a Section Report (xml-based) or Section Report (code based) template and connected it to a data source. See Adding an ActiveReport to a Project for further information.
Note: You can also set a field expression in the DataField property. For example, =Country + City . |
The following image shows a customer list grouped on the Country field.
Tip: In a section report, data is grouped in the order in which it is fetched in the raw form. Therefore, for best results, while setting the SQL query in your report data source, order the data by the grouping field. For example., SELECT * FROM Customers ORDER BY Country |