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.
    Groups
  3. Fill in the following information:
    • Name: grpEmployeePayments
    • Group On: dsetXMLEmployee::lastName
  4. Click OK.
    Groups

    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
    Groups
  7. Under the Outline view, select Body| Table (the one with Orders, not the tblEmployeePayments) | Groups | Table Groups | Header | Row. Delete the row.
    Groups
  8. In the Layout Editor, select the Order Number column. Under the General tab, click on the Suppress duplicates checkbox.
    Groups
  9. Repeat the same thing for the Customer Number column.
  10. Click Preview.

Now, when we click on Preview, we can see that the orders are all grouped by the order number and, instead of repeatedly displaying the order number and customer number for each line like in the previous previews, it will now display it only once.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset