Overview
Version
Report Server Version |
---|
11.0 |
Problem Description
Both the pagination preview and the data entry preview support options to set the report display position. However, no such option is available for the data analysis preview, where all reports are aligned to the left by default. How can you center the report during the data analysis preview?
Solution
You can add a Loading End JS event to center the report during the data analysis preview.
Example
Opening the Template
Open the built-in template: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Advanced\BetweenCellOperation\Ranking.cpt.
Event Addition
Choose Template > Web Attribute > Data Analysis Setting, set Following Settings to Set for This Template Separately, and add a Loading End event in Event Setting, as shown in the following figure.
The JavaScript codes are as follows:
_g().centerReport();
Effect Display
PC
Mobile Terminal
The effect cannot be previewed on mobile terminals.
Template Download
For details, you can download the template Centered Display by JS During Data Analysis Preview.cpt.