I. Overview
1. Problem description
After using Conditional Formatting> Row Height on the expanded data to hide the rows, the serial numbers that have been compiled before are disturbed. For example, after the data in North China is hidden, the sequence number of the hidden row is also hidden, and the sequence number is broken and displayed, as shown in the following figure:
2. Solutions
Set the sequence number formula in Condition Formatting> New.
II. Example
1. Prepare data
Create a new report, create a new database query ds1, the SQL query statement is: SELECT * FROM SALES_VOLUME.
2. Design report
Set Sequence in column A, leave cell A2 blank first, and drag the data set field into the table. The table style is as shown in the figure below:
Select cell A2, set its Expansion Direction to V, and the left parent cell to B2. As shown below:
Select cell B2 and set its Data Setting to List. As shown below:
3. Hidden row height
Select cell B2, add a conditional formatting, and set the row height to 0 mm when the cell value is "North China". As shown below:
4. Set serial number condition formatting
When the row is not hidden, the sequence number is obtained by directly inserting the formula seq() in cell A2, but when settingConditional Formatting> New for the hidden row, the original formula of the cell needs to be deleted.
The new value is formula seq(), and the condition is B2<>"North China", that is, the value of cell B2 is not equal to 'North China'. As shown below:
5. Effect preview
1) PC side
Save the report, click Pagination Preview, the effect is as shown in the figure below:
III. Template download
The completed template can be found at: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\Solution to Hidden Row Sequence Number Discontinuity.cpt
Click to download the template: Solution to Hidden Row Sequence Number Discontinuity.cpt