Successfully!

Error!

Data Connection Overview

  • Last update:  2021-08-11
  • I. Overview

    1. Application scenarios

    Before making reports, the first need to define the data source, the actual user system is the most common data saved in the database, and in the continuous update, the use of database data to make reports, and the report content will be updated with the update of the database.


    2. Function introduction

    There are two types of data connection in FineReport: data connection through the designer and data connection through the platform.

    1) Create data connection in the designer

    Open designer, define the data connection in Server > Define Data Connection, you can establish the required data connection, and customize query statements to create datasets, so as to make reports. As shown in the figure below:

    1.png

    If you need to modify the name of the data connection, you can double-click the original name to modify. After modification, click OK, as shown in the figure below:

    2.gif

    JAR package version after 2021-01-25 designer and server, when multiple users are connected to the same remote server for remote design, the "Define Data Connection" function can only be edited by one person at a time. When one user uses this function, other users will see that "Data connection locked" and cannot be edited, as shown in the figure below:

    3.png

    After clicking the "Lock" icon, a pop-up message will be displayed, indicating that "It has been edited and locked by another user. To prevent data loss, please try again later". As shown in the figure below:

    4.png

    At the "Define Data Connection" sign where the dataset is defined, it will also be locked and display the same "lock" icon. Click it and the pop-up message will be displayed. As shown in the figure below:

    5.png

    When the user finishes editing, it is no longer locked and other users are allowed to edit.

    2) Create data connection in the platform

    ClickServer > Platform Management, open the decision-making platform, click Manage > Data Connection > Data connection Management, select New Data Connection, you can establish the required data connection. For details, see: Configure data connection. As shown in the figure below:

    6.png

    Note 1: FineReport supports five ways to connect to the database through JDBC, JNDI, SAP, XMLA, and FineBI. Data connections are stored in the project, and these connections are activated when the user performs an operation that requires access to the database.

    Note 2: XMLA and FineBI are connected to a multidimensional database, where FineBI is connected to another BI product of FanRuan.

    II. Comparison of JDBC and JNDI


    JDBC data connectionJNDI data connection
    DefinitionJava Data Base Connectivity (JDBC) is a Java API used to execute SQL statements. It provides unified access to various relational databases.Java Naming and Directory Interface (JNDI) is an application programming API that provides developers with a common, unified Interface to find and access various naming and directory services. Similar to JDBC, it is built on an abstraction layer.
    DifferenceJDBC is directly connected to the physical database, database connection is faster, but in the program used on the more complicated, each connection must have a certain code, and the database connection needs to be manually closed.

    Use JNDI to connect to a data source to which the database is defined on the application server side.

    Advantage

    After the report server is deployed, if the database parameters change, modify the JDBC parameters in the configuration file again. As long as the data source name remains unchanged, the data connection does not need to be modified.

    JDBC avoids the tight coupling between reports and databases, and shares the connection pool with the server of the project. In addition, the connection speed is relatively fast, making the application easier to configure and deploy.

    JNDI simply leaves the database backend, drivers, urls, user names, connection pools, and so on to the J2EE container to configure and manage, and then references those configuration and administration.

    III. Index

    No.ContentIntroductionDocument
    1JDBC data connectionThis section uses the Oracle database as an example to describe how to connect to the database through JDBC.[Designer] JDBC data connection
    2JNDI data connectionData connections are defined through JNDI.[Designer] JNDI data connection
    3Multidimensional database
    XMLA data connectionConnect to the multidimensional database through XMLA data connection.   XMLA data connection
    4SAP data connectionFineReport makes the SAP data connection function a plugin, adds the SAP data connection type, adds the SAP dataset type.SAP data connection
    5SAP BW data connection The new SAP BW Cube is used to connect BW Cube and BW Query, and is a separate plugin from the previous cube.SAP BW data connection
    6Other data connectionRedis data connectionThe Redis cache database is also connected through plugin.Redis data connection
    JSON data connectionConvert JSON-formatted data into data tables that can be used in reports through plugin.JSON data connection
    MongDB data connectionInstall the plugin to connect to the MongoDB database.MongoDB data connection
    Spider data connectionBy installing plugin in FineReport10.0 designer, you can interconnect with the FineBI Spider engine to obtain data and share FineBI table data and data permissions.Spider data connection


    Attachment List


    Theme: Data Preparation
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback