I. Overview
1. Version
Rreport server version |
---|
10.0 |
2. Expected effect
Grouping by section is a typical advanced report grouping and it's based on the value section of data.
For example, according to the score section, age section, time section, etc., the records belong to a certain value range are grouped and displayed, as shown in the following figure:
3. Implementation ideas
Use the grouping in the data column properties for custom grouping.
II. Examples
The following describes the process of creating the age range report in the figure above.
1. Report design
1) new report
Create a new normal report and add data set DS1, as shown in the figure below:
The SQL statements are: select * from EmployeeInformation.
2) report style
Select cell A3, click cell attributes > Expand > Expansion Direction, and set cell A3 to expand vertically, as shown in the following figure:
Select cell B2, click cell attributes > Expand > Expansion Direction, and set cell B2 to expand horizontally, as shown in the following figure:
3) data setting
The data column of cell B3 is set to summary and count. As shown in the figure below:
2. Custom conditional grouping
Designer preview template, all ages will be expanded at this time, we want to display the ages by sections.
Select cell B2 where the age data column is located, and modify the data settings to group and advanced, as shown in the following figure:
Click the custom button in the figure above to open the custom grouping dialog box and select condition grouping. Divide the age into four groups.
Group 1: less than 20 years old, as shown in the figure below
Group 2: named as 20-30 years old, provided that the age is greater than or equal to 20 and less than 30, as shown in the figure below:
Group 3: named as 30-40 years old, the condition is that the age is greater than or equal to 30 and the age is less than 40, as shown in the figure below:
Group 4: named as over 40 years old, with the condition that the age is greater than or equal to 40, as shown in the figure below:
3. Mandatory grouping
Because there is no age below 20, the group below 20 is not shown if you uncheck the box of mandatory group.
If you want to display all defined groups even if there is no matching data, you can select mandatory group in the custom group interface, as shown in the following figure:
4. Effect preview
1) PC terminal
Save the template and select pagination preview. The effect is as shown in I.Overview.
2) Mobile terminalThe App and HTML5 display effect is the same, as shown in the following figure:
III. Template download
For completed templates, see %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\GroupInSec.cpt
Click download template: