I. Overview
1. Version
Report server version | JAR package | Function change |
---|---|---|
10.0.19.03 | 2021-10-29 | Added "PC Adaptive Attr" |
2. Function introduction
Click Server > Server Configuration Manager, and the server configuration interface will pop up. In the server configuration manager, set "Pagination Preview Settings", "Data Entry Settings", "Data Analysis Settings", "Reference Css", "Reference JavaScript", "Error Template Definition" , "Print Setting", and "PC Adaptive Attr" are applicable to templates under the entire server, as shown in the following figure:
II. Pagination Preview Settings
The pagination preview settings page is valid for the pagination preview of all templates under the entire server. For example, click Server > Server Configuration Manager > Pagination Preview Settings, select the report display position to display center, and click OK. As shown below:
Then click Template > Web Attributesand select Pagination Preview, and select Use server report settings. It can be seen that the report display location has become center, as shown in the following figure:
III. Data Entry Settings
Data entry settings, which is valid for the pagination preview of all templates under the entire server. Similar to the pagination preview effect in Section II, it will not be repeated.
IV. Data Analysis Settings
The data analysis settings takes effect for the data analysis preview of all templates under the entire server. Similar to the pagination preview effect in Section II, it will not be repeated.
V. Error Template Definition
The server configures relative template Web attributes, and adds the function of error template definition.
Note: Error template definition only supports PC terminal.
1. Problem description
The color tone of the error page that comes with the report is as shown in the figure below, but the customer project may have its own color tone and unified error page, which is inconsistent with the one provided by us, so you need to use a custom error page.
2. Implementation ideas
In Server > Server Configuration Manager > Error Template Definition, directly call a custom error page such as: /error.html, and the error message can be obtained in the page through the template error parameters message, charset, and exception.
When using a custom error page, you can call the parameters of the error page of the reporting system. The parameters and descriptions are simply listed below.
Parameter | Description |
---|---|
message | Prompt error message |
charset | Set the encoding of the server |
exception | Error exception stack information |
The above parameters can be called in the form of ${parameter name}. If the parameter message is called in the defined error.html page, the error message will be displayed in the table, as follows:
<html>
<body>
<table>
<tr>
<td>
${message}
</td>
</tr>
</table>
</body>
</html>
3. Calling the error.html page in the report
The defined error page is called in the template path of Server > Server Configuration Manager > Error Template Definition, which can be called by relative path:
Relative path: The custom error page error.html is placed under the current web application, such as the webroot directory, and is called through a relative path. The template path is: /error.html.
Note: html type files do not support calling with absolute path.
VI. PC Adapative Attr
In Server > Server Configuration Manager > PC Adaptive Attr, users can modify the adaptive attributes of "Dashboard" and "General Report" in the server configuration manager, and the template will take effect on the entire server, as shown in the following figure:
For example, select General Report, and check Adaptive and Bidirectional for "Font" and "Form" respectively, as shown in the following figure:
Create a new general report, click Template > PC Adaptive Attr, and select User server report view setting. It can be seen that "Font" and "Form" have become "Adaptive" and "Bidrectional", as shown in the following figure:
VII. Attention
1. Priority of template web attributes and server configuration
If the preview mode of the report is not set separately, the server configuration will be set uniformly. If it is set separately for the preview mode of the report, it will be displayed with the attributes set separately.