Creating groups

Top  Previous  Next

Adding a group into a report can be done by using two methods.

 

First method: you add the "Group header" band in the "Configure Bands" window. To do this, press the "Add" button and select the "Group header" band. FastReport adds the group to the available "Data" band or will create a whole group, if such a band is not in the report:

 

group_create1

 

In order to configure a group, double click the "Group header" band. You will see the group header editor window:

 

group_create4

 

You need to set the group condition. This can be any expression or data source column. Also choose the sorting. By default, data is sorted in ascending order.

 

Second method: you use the wizard, which can be called from the "Report|Group Expert..." menu. In order to create a group, enter the group condition and press the "Add" button:

 

group_create2

 

The wizard will add all the elements of the group into the report. Also it creates the "Text" object on the group header, in which the group condition is printed:

 

group_create3