Successfully!

Error!

Driver Management

  • Last update:  2024-03-07
  • Overview

    Version

    FineReport Server Version

    Functional Changes

    11.0.1

    Added the Driver Management function.

    11.0.5

    Not allowed to upload the driver package through Driver Management.

    Used the SystemConfig.driverUpload parameter to control whether to allow uploading new drivers.

    11.0.24Added the Driver Loading Order configuration item.

    Application Scenario

    You may fail to connect to FineReport or the database due to the lack of the built-in database driver of the corresponding version.

    Function Description

    You can use the Driver Management function to upload the corresponding driver. Driver Management supports hot swapping, which allows you to use the driver after uploading it without restarting FineReport.

    If a driver is problematic, you can quickly modify the driver-loading method to ensure a fast connection. By default, Load and Upload Driver Preferentially via Current Method is selected, as shown in the following figure.

    Load and Upload Driver Preferentially via Current Method refers to loading the JAR file in WEB-INF/drivers/hive first. If no such file exists, it will load the JAR file in WEB-INF/lib.

    Load and Upload Driver Only via Current Method refers to only loading the JAR file in WEB-INF/drivers/hive.

    1.png

    Preconditions

    FineReport prohibits uploading drivers through Driver Management by default due to the high requirements of most users for project security.

    Therefore, before using the Driver Management function, you need to set the SystemConfig.driverUpload parameter in the fine_conf_entity table of the FineDB database that stores FineReport information to true.

    Change the parameter value to true: You are allowed to upload the driver package through Driver Management. For details about the procedures, see the following sections.

    Change the parameter value to false (default value): You are not allowed to upload the driver package through Driver Management. The following error occurs during uploading. The driver is not allowed to be uploaded. You can modify the value of SystemConfig.driverUpload to enable this function.

    2.png

    Creating a Data Connection

    Log in to the decision-making platform as the admin and choose System Management > System Setting > General.

    If the External Database is to be configured, you can obtain the FineDB database information referring to FineDB Database Introduction.

    If the External Database is configured, you can click it to view the information of the external FineDB database.

     3.png

    Create a data connection named FineDB and fill in the obtained database information.

    iconNote:
    You are not advised to modify the data connection name. Otherwise, the following template may be unusable.


     4.jpg

    Updating the Field Through Data Entry

    iconNote:
    For details about the steps of remote connection, see Remote Design.


    Connect the designer to the project remotely and preview the template finedb field modification.cpt.finedb field modification.cpt

    1. If the SystemConfig.driverUpload field exists on the preview page, and the field value is true, the configuration is completed.

    2. If the data on the page is empty, the SystemConfig.driverUpload field does not exist. You can click Add Record to create a record.

    Enter SystemConfig.driverUpload as the ID and true as the value, and click Submit.

     5.png

    Restarting the Project

    Restart the project after you have finished the above steps. Log in to the decision-making platform, and now you can upload the driver package through Driver Management.

    Procedure

    Uploading the Database Driver

    Log in to the decision-making platform as the admin and choose System Management > Data Connection > Data Connection Management > Driver Management, as shown in the following figure.

     6.png

    Click New Driver and enter a name for easy differentiation from other drivers. Take uploading the PostgreSQL driver as an example. You can click Upload File to upload the driver package and name it postgresql driver, as shown in the following figure.

     7.png

    Click Upload File to upload the JAR package of the database driver.

    iconNote:
    You can download the database driver in the help document of corresponding databases or get it from the database administrator.


     8.png

    Select the uploaded driver from the drop-down list of Driver, and click Save, as shown in the following figure.

    iconNote:

    1. If there are multiple JAR packages for a driver, and you are unsure which one to upload, ask the corresponding database administrator for help.

    2. The uploaded driver JAR file is located at %FineReport%\webapps\webroot\WEB-INF\drivers.


     9.png

    Using Uploaded Database Driver

    Click New Data Connection on the Data Connection Management page to create a PostgreSQL data connection, as shown in the following figure.

     10.png

    Select Custom and the uploaded PostgreSQL driver from the drop-down lists of Driver, and fill in the database information. For details, see PostgreSQL Data Connection.

     11.jpg

    Click Test Connection and you may find that the database is successfully connected, as shown in the following figure.

     12.jpg

    Deleting a Driver

    To delete an existing database driver, you can go to the driver management page and click the delete button, as shown in the following figure.

    13.jpg

    Earlier Versions

    The Driver Management function is not available in 11.0.1 and earlier versions, where you can upload driver packages manually.

    Copy the downloaded driver and paste it to the %FR_HOME%\webapps\webroot\WEB-INF\lib directory, and the driver will take effect after you restart the report server.

    iconNote:
     If the driver does not take effect after a restart, check whether drivers of other versions exist in the directory. If so, delete them to avoid conflicts.


    14.jpg

     

     


    Attachment List


    Theme: Decision-making Platform
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback