Recently, Birt supports cross table
The following is a simple example to illustrate how to create a cross tabulation.
The data table is a sales record table, which contains the following fields: merchant shop, product category, sales volume amount
The effect is displayed in the vertical bar on the left, in the horizontal bar on the top of the page, in the middle of the page, sales, and the total and bottom of the right of the corresponding seller as the total of the corresponding product category. The bottom right corner shows the total.
------------------------------------------
| Category 1 | Category 2 | Category 3 | Total
------------------------------------------
Merchant 1 | 1 | 2 | 3 | 6
------------------------------------------
Merchant 2 | 1 | 2 | 3 | 6
------------------------------------------
Merchant 3 | 1 | 2 | 3 | 6
------------------------------------------
Total | 3 | 6 | 9 | 18
------------------------------------------
Steps:
1. New data source.
2. New data sets.
3. New data cubes.
Groups and summaries
Drag shop and category in available fields to drop a field here to create a group to generate two groups;
Drag amount from available fields to drop a field here to create a summary to generate a summary field in groups and summaries;
OK;
In data explorer, modify the name of goup and summaryfield, and set the display name to Chinese.
4. Drag the cross tab from palette to design, drag the group shop in data cubes to the left column in data explorer, drag the Group category to the top, and put the summary fields amount in the middle;
In design, click the downward arrow of group shop and Group category and select totals to Add rows and columns.
5. Select crosstab-General-for empty cells and show 0 in outline. If no value exists, 0 is displayed by default.
6. Preview.