I. Description
After the line in the template used to freeze the built-in columns using our statements often caused the expected result is different from what you want, then you can use the data set filter columns, is actually to specify data show, make the front look exists the effect of column, but does not conflict with freeze, template preview effect as shown in the figure below:
From the figure, we can see that while keeping the frozen ranks, it can also achieve the effect of group columns.
II. Operation steps
1. Data preparation
The data needs to be in accordance with our data requirements classified by groups:
2. Template design
The report style is designed as follows:
The left parent cells of cells A3~E3 are all set to cell A2.
Click Template>Duplicate and Freeze, set the Repeat Title Rows from row 1 to row 2, and set Freeze row 1 to row 2 at the Pagination Freeze position, as shown in the following figure:
3. Modify the result set filtering method
Drag the field that needs to be divided into 5 columns repeatedly (you need to divide into several columns and drag several columns) and expand vertically in the cell, because you need to group according to A2 cell, set the left parent cell to A2, so that you can achieve the third row The data is grouped and displayed according to cell A2, but now the data is all displayed, there is no column effect, but the data is repeated.
Double-click the A3 cell, the data column dialog box will pop up, select Advanced, change the Result Set Filter toSpecify, and write the formula =if($__count__<5,1,JOINARRAY(GREPARRAY(range($__count__),item% 5 == 1),","))
The formula means that if the total number of current data is less than the number of columns that need to be divided, it is 1 (to avoid the situation that the number of data is less than the number of columns in the column and the data is empty, causing all the data to be displayed), otherwise it is the total number for 5 Take the remainder equal to the array composed of 1, that is, 1,6,11,16,21...and because the specified function of data set filtering can be when the number of the array is 1,6,11,16,21 according to its own The data is revealed.
Note: "=" must be added when entering the formula
The formula for filtering the result set of cell B3 is =if($__count__<5,2,JOINARRAY(GREPARRAY(range($__count__),item% 5 == 2),","))
The data is displayed when the number of data itself is 2, 7, 12, 17... of the total number.
The following data are all analogized.
Among them, the last formula is =if($__count__<5,5,JOINARRAY(GREPARRAY(range($__count__),item% 5 == 0),","))
The above two steps can achieve that in the case of row freezing, there are columns and does not affect the display effect.
III. Effect preview
1. PC
After saving, click the pagination preview to divide the repeatedly frozen result set into columns. The effect is Section I. above.
2. Mobile
IV. Completed template
The completed template can be referred to: %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Result_filtered_in_columns.cpt
Click to download:
Result_filtered_in_columns.cpt