I. Description
When there is too much content in a cell, when previewing the report, the cell will automatically adjust the row height and column width to fully display the cell content. However, sometimes for layout needs, it is hoped that the cell size can be fixed (not enough to display the cell content completely), and the entire content of the cell can be viewed by pulling the scroll bar.
As shown below:
II. Idea
In the Cell Element > Advanced > Display value, use the HTML <div> tag and add the style attribute, and then select No Automatic Adjustment and choose Display by HTML of the Display Content.
III. Steps
Add a built-in dataset, and set the data at will, as shown in the figure below:
Drag in the data column in the cell, as shown in the figure:
1. Set the scroll bar
Right-click B2, select Cell Element>Advanced>Display Value, and enter the formula
"<div style=\"height:60px;width:150px;overflow-y:scroll;\">"+$$$+"</div>"
As shown below:
2. Cell display setting
Right-click B2, select Other, select No Automatic Adjustment, and check Display by HTML, as shown in the following figure:
IV. Effect preview
1) PC
Click Pagination Preview, the scroll bar is as shown in the figure below:
2) Mobile
Note: The mobile terminal does not support this function.
V. Completed template
Refer to the completed template: %FR_HOME%\webroot\webapps\WEB-INF\reportlets\doc-En\ReportApplication\BasicApplication\Scroll_bar_within_cell.cpt
Click to download: