I. Overview
In the group report, it is often necessary to summarize the data in the group. Sales in each region are summarized as follows:
II. Examples
1. Design report
Create a new data set DS1, write the SQL query statement select * from sales_volume in the database query.
Enter a title row and design the report, add two lines of Group summaryand Total below, C4 and C5 add formula: =sum (C3)
2. Setting the parent cells
1) Sum the sales volume, as shown in the figure below:
2) Set the left parent cell of Salesperson cell B3 as the region data column cell, cell A2, as shown in the following figure:
3) Set the left parent cell of group summary A4 and B4 as the region data column cell, cell A2, as shown in the following figure:
4) Cell C4 will follow the subtotal cell A4 by default, but in order to avoid mistakes in the template process, you can also set the left parent of cell C4 to cell A2, as shown in the following figure:
3. Effect preview
Save the template and select pagination preview. The effect is as shown in I. Overview.
The Group summary column is copied with the expansion of the parent cell - region. That is, group summary for each expanded region. The blue part in the figure.
The Total column is at the bottom and will not be displayed until all the upper cells are expanded. The orange part in the figure.
III. Template download
For completed templates, please refer to
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportDesign\GroupSum.cpt
Click to download the template: