Aggregations are a way to take data as a whole and apply calculations to them, such as counts or sums of data columns. New to BIRT 2.3+ is the aggregation visual component. In newer versions of BIRT, the developers have broken away from the older, scripting based aggregations. With improvements made in the 2.5 series, it is now possible to do some very powerful and interesting things such as using aggregations in groupings for charts, which wasn't possible in BIRT before. Let's take a look at how to build a simple count aggregation for the employees in our offices.
employeeGroupCount.rptDesign
. dsEmployeeOffices
using the following query:select EMPLOYEES.EMPLOYEENUMBER, OFFICES.OFFICECODE, OFFICES.CITY, OFFICES.STATE from EMPLOYEES, OFFICES where OFFICES.OFFICECODE = EMPLOYEES.OFFICECODE
dsEmployeeOffices
and select Insert in Layout. OfficeCode
column. City, State
, and OfficeCode
are in the Group
header. Integer
, and set the function to COUNT
. For the Expression, use row["EmployeeNumber"]. Make sure that under Group option, the grouping made for the table is selected. Employee Count
.