Groups
Grouping, much like in an RDBMS, is a mechanism used to group data that falls into a similar category. This can be done with a SQL SELECT
statement using the GROUP BY
clause or, in BIRT, it can be done by adding a group to a Table or List. We are going to add to expand the above report examples by adding groups.
1. In the Outline view, select
tblEmployeePayments
.2. In the Property Editor, open the
Groups
tab and click on the Add… button.3. Fill in the following information:
Name:
grpEmployeePayments
Group On:
dsetXMLEmployee::lastName
4. Click OK.
Now, when we preview the report, we can see that it adds an extra header with last names and groups all the like payments together. Of course, this will be better illustrated with the next example, where we modify the
Order
table to display groupings by order number.5. Add a new group to the table with the Orders.
6. Enter the following information:
Name:
grpOrderInfo
Group On:
ORDERNUMBER
7. Under the Outline view, select Body| Table...