Overview
Version
Report Server Version |
11.0 |
Expected Effect
The data in the database table is recorded in chronological order. If you want to query some data and display them in the same sequence, while merging consecutive identical values of a field, you can achieve this through adjacent identical values grouping.
Implementation Method
You can drag the data columns into the cells directly. Common, is selected for Data Setting by default, which means all identical items will be merged and displayed together. This document will introduce how to use the adjacent identical values grouping to merge consecutive identical items.
Adjacent identical values grouping is often used in conjunction with sorting in SQL to achieve the general grouping, which offers better performance compared to the effect by using common grouping directly. For details, see Wise Use of Grouping Adjacent Identical Values
Example
Data Preparation
Create a built-in dataset, as shown in the following figure.
Report Design
Report Format Design
Drag the fields and fill the text into the corresponding cells. Set the font alignment to Center and add the inside and outside borders, as shown in the following figure.
Consolidation and Summarization Setting
1. Select the Region field, choose Cell Element > Basic > Data Setting, and select Group and Adjacent, as shown in the following figure.
2. Select the Salesperson field, choose Cell Element > Basic > Data Setting, and select Group and Adjacent, as shown in the following figure.
3. Select the Sales field, choose Cell Element > Basic > Data Setting, and select Summary and Sum, as shown in the following figure.
Effect Display
PC
Save the template and click Pagination Preview. The effect is the same as that shown in section "Expected Effect."
Mobile Terminal
The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.
Template Download
For details, you can download the example template: Grouping Adjacent Identical Values.cpt