6. Repeat for the PRODUCTCODE, PRICEEACH, and QUANTITYORDERED
fields.
7. Click on the gray square at the top of the last colum to select the entire last
column. Once done, right-click and select Insert|Column to the Right.
8. Right-click on the new Detail cell, and insert a new Data Element. Use the
following information:
Display Name: Product Total
Data Type: Any
Expression: row["PRICEEACH"] * row["QUANTITYORDERED"]
9. Create a Label for this column titled Product Total. Format both the Product
Total Detail cell and the PRICEEACH cell as Currency.
Working with Data
[ 98 ]
10. Save and Preview.
Groups
Grouping, much as in an RDBMS, is a mechanism used to group data that falls into
a similar category. This can be done with an SQL Select statement using the GROUP
BY clause; or in BIRT, it can be done by adding a grouping to a Table or List. We are
going to add to the previous 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. Use the following information:
Name: grpEmployeePayments
Group On: dsetXMLEmployee::lastName
4. Hit 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.
Pages:
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110