I. Overview
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
SQLite is the most widely deployed SQL database engine in the world. The Demo database built in FineReport is the SQLite database.
II. Data connection
1. Configuration information
Driver | URL | Driver download address |
org.sqlite.JDBC | jdbc:sqlite:[PATH_TO_DB_FILES] | 1) FR built-in SQlite-jdbc.jar driver package, no need to download 2) FR Built-in FRDemo.db database file, without downloading |
2. Downloading the driver File
If the driver is deleted or fails. Alternative update driver package:
Delete driver package sqljdbc.jar under %FR_HOME%\webapps\webroot\WEB-INF\lib. Copy the downloaded driver package to the directory.
3. Selecting a connection mode
FineReport provides two ways to connect data:
Method 1: Connect to the database in the designer. For details, see [Designer]JDBC data connection.
Method 2: Connect to the data decision platform. This paper mainly introduces this way.
4. Creating a data connection
1) The administrator logs in to the data decision system and selects the Manage>System>Data Connection>Data Connection Management, click New Data Connection, select SQLite under All options, and click OK, as shown below:Note: If non-administrator users want to configure data connection, the administrator must assign the permission of the data connection node in the management system to them. For details, seeData Connection Authorization.
2) Enter the data connection information in the configuration information format described in Section II. Advanced Settings are optional. For details, see [Platform] Data Connection. After input information, the interface is as follows:
3) Click Test Connection. If the "Connection successful" prompt box pops up, the database is successfully connected, as shown in the picture below:
4) Click the Save button in the upper right corner after mode selection, and the data connection will be added successfully. As shown below:
Note: When the SQLite database obtains a connection, if there is no database in the PATH path of the URL, the database will be automatically created in this path. Therefore, the connection will succeed even if there is no SQLite database in the actual PATH path.