Birt Simple Crosstab
Birt Simple Crosstab
Introduction
A cross tab displays the relation between two or more variables in a matrix format. A cross tab
report item is based on a multi dimensional data cube, which is a collection of dimensions
(groups) and measures. A BIRT data cube is based on one or more BIRT datasets.
The goal of this tutorial is to describe at a high level the steps required to create a simple BIRT
report design with cross tab report item (productSalesByRegion.rptdesign). The following
features are covered
• BIRT Data Cube based on a single data set
• Cross tab based on a cube
• Filters in cross tab
• Sorting in cross tab
• Grand totals for rows/columns in cross tab
Business Scenario
For a fictitious company called Classic Models Inc you are asked to create the following report
• A report that displays sales of all products in different regions categorized by country, state
and city of sale.
The sample report design will use the “Classic models” sample database that is shipped along
with the BIRT Report Designer
Steps to create the sample report design productSalesByRegion.rptdesign in BIRT
Designer
Measure Description
Order Total Order Total
6) Add “product” group hierarchy to the cross tab column area, “customerRegion” hierarchy
to the row area and “OrderTotal” to the detail area.
7) Use the ‘Show/Hide’ Group levels dialog to show all required levels.
8) Define the filter criteria to show all product line except “Classic Cars”. The filter condition
can be defined using the filter tab in the cross tab property editor.
9) Define the sort criteria to show group level ‘Country’ in descending order. The sort
definition can be defined using the cross tab property editor.
10) Show the column and row grand total by using the ‘Total’ dialog. The total dialog is
available on the Group left click menu on the layout.
11) Modify the predefined style ‘crosstab-detail’ and ‘cross-header’ to the required font and
background color.
12) Preview the report design.