I. Overview
1. Version
Report server version |
---|
10.0 |
2. Expected effect
When making some paginated reports, sometimes it is hoped that the data of each page, the data of each group and all the data can be summarized and displayed separately. The effects are as follows:
As shown in Figure 2:
3. Implementation ideas
Page Totals: Using Formulassum({Cell})To achieve the total of each page , where {cell} can get all the values extended by the cell of the current page , in order to display each page, it is necessary to set the repeating end row.
Combinator: Using Formulassum(Cell)To implement total by grouping, set the parent cell of the cell to the cell where the grouping field is located.
Grand Total: Using Formulasum(Cell)Implement the total, because this only needs to be displayed on the last page, so there is no need to set the parent cell.
II. Examples
The setting up with the pagination summary example 1 shown in I.Description is the same as the method in group summary in Pagination, please refer to the methods there.
We will focus on expanding the cell in two directions to achieve the total in the page.
1. Add dataset
DS1: select * from sales_basic
2. Report design
3. Setting advance custom formula grouping
Select cell A2, select group > advanced for data setting in cell elements, click Custom, select formula group, and write formula in custom value: ceiling (salary ($$$, ds1.group (Salesperson)) / 5), which means expand line, 5 lines as a group.
4. Parent setting
Set the left parent cell of C3 cell to A2, and the up parent cell is the default.
5. Setting duplicate title and end lines
Set the first line as repeated title rows.
Set the fourth line as duplicated end rows.
6. Setting pagination after row
In cell C3, set the Cell attributes > pagination > paginate after row as shown in the figure:
7. Hidden columns
After setting all, hide column A.
8. Save and preview
Save the file and preview the final results.
III. Template download
For completed templates, please refer to:
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\PagSum.cpt
Click to download the template: