I. Overview
1. Expected effect
Sometimes the report has a large amount of data and is displayed without pagination. It is troublesome to view the later data. Hope to quickly locate the corresponding number of rows through the specified number, as shown in the figure below:
2. Realization idea
Through the use of HTML anchor links, it is possible to locate the element corresponding to the ID.
II. Example
1. New report
1) New datasetCreate a new normal report, create a dataset ds1, the SQL statement is: SELECT * FROM ORDERS limit 200. As shown below:
2) Design reportDrag data into the corresponding cells, the report style is as shown in the figure below:
2. Set attributes for serial number cell
1) Select A3, click cell element, and insert the formula: =seq(). As shown below:
2) Select A3, click Cell Attributes > Display, and set it as Formula Form:="<span id='"+$$$+"'>"+$$$+"</span>". As shown below:
3) Select A3, click Cell Attributes > Other> Advanced, and select Display by HTML. As shown below:
3. Set Drop-down box widget
Select B1 and click Widget Setting to set it as a Drop-down box widget. As shown below:
1) Set widget attributesThe Data Dictionary type is set to Formula, the actual value =RANGE(200). As shown below:
2) Set widget eventSelect B1, click Widget Setting>Event, add an after editing event , and enter JavaScript code, as shown in the figure below:
The JavaScript code is as follows:
location.href = "#"+this.value;
4. Effect preview
Save the template, click Data Entry Preview, the effect is as shown in I.1.
Note: Mobile is not supported.
III. Template download
Please refer to the completed template: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\Jump_to_specified_row.cpt.
Click to download: