I. Overview
1. Problem description
Sometimes our database field stores the content of multiple characters spliced, as shown in the figure below (top left), and its data dictionary is shown in the figure below (bottom left), how to set them to display as shown in the figure below (right)?
2. Ideas
Divide the string into an array, and then use Display>Data Dictionary to display.
II. Operation steps
1. New dataset
Create a new template and add two embedded datasets, as shown below:
2. Report design
1) Drag the data column to the cell, and the template settings are as follows:
2) Insert a column in the back and enter the corresponding split formula: split(B2,","), as shown below:
3) Set cell C2 to no expansion:
4) Set the Display>Data Dictionary in cell C2, as shown below:
5) Hide the original second column:
III. Effect preview
1. PC
Save and click the Pagination Preview, and the effect as follows:
2. Mobile
App has the same effect as HTML5, as shown in the following figure:
IV. Template download
The completed template can be found in:
%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Substitute by string
sections.cpt
Click to download the template: Substitute by string sections.cpt