Previous Next

Aggregating Data

Aggregating Data

One of the key features of any report is the ability to display summary, or aggregate, information. For example, a sales report can show the overall sales total; sales subtotals by product type, region, or sales representatives; average sales figures; or the highest and lowest sales figures.

Aggregating data involves performing a calculation on a set of values rather than on a single value. For a simple listing report, aggregate calculations are performed on values in a specific field, over all the data rows in the report.

BIRT calculates an average payment in a report by adding the values in the Amount field in every row, then dividing the total by the number of rows.

How to display aggregate data

1
On the palette, under Quick Tools, drag an aggregation element and drop it in the header or footer row of a group or a table.
2
1
In Column Binding Name, type a unique name. Remember, for each piece of calculated data to display in a report, there must be a column binding.
2
3
4
o
o
If performing an aggregate calculation on values other than values in a data set field, type an expression. You can open the expression builder to get help constructing an expression.
5
In Filter Condition, specify the filter condition to use to determine which rows are factored in the aggregate calculation.
6
o
o
Figure 9‑1 shows an example of a complete definition for an aggregation element. In the example, the element returns the number of rows in the table, where the extended price of the product is greater than $5,000.00.

Figure 9-1 Aggregation Builder displaying values for getting the count of products in the table

Figure 9-1
7
In the report design, the aggregation element displays the sigma symbol followed by the column binding name, as shown in the following example:
[Total_Products]
3


(c) Copyright Actuate Corporation 2008