Designer: 1. Add a database driver.
Choose toolbar> preferences> report runtime configuration> database driver configuration, click Add, select a database driver, and click open ], add the database driver to the database driver configuration list and click OK.
2. Create a data source. Select a database type. You can select any one of the following options because the designer does not have the KingbaseES option. Then you need to manually modify the JdbcDriver and url options, as shown below:
Click "check data source". If no error message is displayed, the data source is successfully connected. Click "Finish.
Server: Add a data source to a node in the WEB-INF \ resources \ config. xml configuration file as follows:
- <DataSource>
- <! -- Data Source Name, consistent with the data source name of the report template in the designer -->
- <Name> KB_DS </Name>
- <! -- The JNDI search prefix is set based on the specific server type. If there is no prefix, the node content is blank, but the node still needs to be retained,
- That is, <JNDIPrefix> </JNDIPrefix> --> <JNDIPrefix> java: comp/env/</JNDIPrefix>
- <! -- The JNDI Resource Name of the data source, which is consistent with the JNDI Resource Name of the Application Server -->
- <JNDIName> kingbasees </JNDIName>
- <! -- Database type, all letters in uppercase -->
- <DBType> KINGBASE </DBType>
- <! -- Database encoding method -->
- <DBEncode> GBK </DBEncode>
- <! -- Whether to perform SQL statement transcoding -->
- <SQLDecode> false </SQLDecode>
- <! -- Whether it is the default data source -->
- <Default> false </Default>
- </DataSource>