I. Description
When displaying data, I hope that the data of the template can be dynamically folded, that is, click the plus sign in front of the data to expand the corresponding data below, as shown in the figure below, how to achieve this?
II. Realization ideas
You can view the effect by setting the template as the organization tree report, then setting the tree node button, and finally through the data analysis preview (&op=view).
III. Example
1. Reference documents
The realization method can refer to Organization tree by tree dataset.
2. Add tree node button
Fold the tree by setting the tree node button, right-click cells A1, A2, A3, select Widget Settings> Button Widget, select "Tree Node Button" for the button type, and set as follows:
3. Save and preview
Save the template. Click the data analysis in the designer, and the preview effect is as above.
Please refer to the completed template%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Dynamic_folding_tree.cpt
Click to download:
From this we can see that the design idea of the dynamic folding tree is to control the expansion and collapse of the content of the sub-items attached to the group when the main cell is clicked, thereby achieving the effect of data analysis.
Note: Since we implement this function through a button widget, the normal pagination preview will not display the widget, and it needs to be displayed in the op=view state, that is, data analysis.
Note: The dynamic folding tree does not support font color settings.