When Will a Dataset Be Executed

  • Last update:August 29, 2025
  • Description

    Querying database tables through datasets can be slow when the dataset is expanded with large amounts of data.

    If multiple datasets have been defined in a template, exhaustion of the database connection pool will occur, as each dataset execution creates a separate database connection.

    All the above issues are related to the execution of datasets. So, when will the datasets be executed?

    When Will a Dataset Be Executed

    1. Will a Dataset Be Executed When It Is Defined

    Creating a dataset or editing the SQL query statement does not execute the dataset. Execution only occurs when you preview the defined dataset.

    2. Why Expanding the Dataset Is Slow with A Large Data Volume

    When a dataset is expanded, the SQL statement is executed to obtain the dataset column names. However, during expansion, the full SQL statement is not executed. Instead, only the first few records are executed to retrieve the column names. This significantly improves the speed at which the designer obtains the dataset column information, enhancing the user experience.

    3. Will The Not Used Datasets Be Executed During Report Preview

    If multiple datasets are defined in a template, the ones that are not used will not be executed during report preview.

    In FineReport, only the cells that use a dataset in calculations will trigger the execution of the dataset during report preview. For example, if a data column is bound to cell B3, the dataset will only be executed when the report preview process reaches cell B3. At that moment, a database connection is established. After the dataset execution is completed, the connection is automatically released.

    A dataset will also be executed only once. If other cells use different columns from the same dataset, the dataset will not be executed again.

    Attachment List


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

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy