Large Dataset Export Plugin

  • Last update:  2023-08-04
  • Overview

    Version

    Report Server Version

    Plugin Version

    Functional Change

    11.0

    1.0.0

    /

    11.0.10

    1.1.16

    1. Changed the plugin name into Large Dataset Export Plugin.

    2. Allows exporting CSV files.

    Application Scenarios

    Exporting a large amount of data may cause pressure for the server, network, and databases. To prevent such risks, FineReport provides the Large Dataset Export plugin, which allows export data based on dataset results.

    Functions

    Large Dataset Export plugin allows exporting Excel files through streaming export in the backend with fewer resources and higher speed and without displaying data.

    With the Large Dataset Export plugin, you can customize the export event of large datasets and directly export data without calculations.

    The implementation procedure is as follows:

    1. Use SXSSFWorkbook for quick streaming export.

    2. Use one thread to get data and store the data rows in queues, and another thread to read the data rows and export them.

    iconNote:
    The FineReport designer allows exporting large datasets as Excel through JavaScript.

    Notes

    1. This function is only applicable to relational databases, and you need to set the cursor of SQL Server database to the server cursor.

    2. This function does not allow exporting null whose data type is date or datetime. Add the zeroDateTimeBehavior=convertToNull parameter to the end of the URL of JDBC data connection. Oracle data requires no modification.

    3. If there are multiple parameters in a template, and you need to set parameters when exporting, set all the parameters. If only some parameters are set, the data cannot be exported.

    4. The recommended export data size is less than 10 million rows * 20 columns, otherwise the exported data may not be complete.

    5. Data in the exported Excel is directly obtained from databases through SQL statements, rather than the data in reports. Therefore, the data formats set in the reports cannot be exported.

    6. This function is not applicable to mobile terminals.

    7. In the plugin of V 1.1.10 and later versions, a progress bar will be provided if the export time exceeds five seconds.

    8. The plugin supports stored procedure only in the following way.

    Plugin Introduction

    Installing the Plugin

    Click to download the plugin: com.fr.plugin.largedatasetexcelexport.v10-1.1.18.zip

    For details about installing designer plugins, see Designer Plugin Management.

    For details about installing server plugins, see Server Plugin Management.

    Plugin Introduction

    After installing the plugin, add the Large Dataset Export event to Widget Setting > Event.

    The setting items and their functions are described in the following table.

    Setting Item

    Introduction

    Notes

    File Name

    • Optional

    • Supports custom export Excel names.

    • Defaults to Template Name-Datset Name if no modification.

    • Supports parameters such as =$parameter. 

      iconNote:
      The equal sign in the example is not a sign of formula. The format of parameters plus text is not supported. A file name containing parameters cannot contain text.


    • If a file name contains escape characters /, the browser will transform them into _ during download.

    • If you use a parameter to name the file, the parameter must be bound with widgets in the parameter pane.

    Export Format

    • Defaults to Excel.

    • If CSV is selected, you can select UTF-8 or GBK.

    /

    Dataset

    • Required.

    • Used for selecting datasets to be exported.

    • Includes server datasets and template datasets.

    /

    Parameter

    • Optional.

    • Used to define the parameters in selected datasets. Defaults to empty.

    • Click  on the upper right corner to refresh, and you can obtain all parameters and default values from the selected datasets.

    • Supported data types: String, Integer, Double-Precision, Date, Boolean, and Formula

    • Parameter assignment in the event will not affect the settings of parameters with the same name in the template.

    • If the parameter type is cell, ensure that the result of the extended cell can be obtained.

    Export Column

    • Optional. Used to select the data columns to be exported. Supports multi-selection. Defaults to exporting all columns.

    • Add Fileds: click Smart Add Fields to obtain all columns obtained from the selected datasets. You can rename fields or remove some fields.

    • Remove Field: press Ctrl and select multiple added fields. Click Remove Field and OK.

    • If you have renamed the column name, the exported column name is the modified name.

    • If you add the same field repeatedly, you can choose whether to cover the existing fields.

    • When there are escape characters / in column names, if these columns fail to be exported, all columns will be exported.

    Example One: Exporting Fixed Parameter Value Through Large Dataset Export Plugin

    Setting the Template

    Open the GettingStarted.cpt template in the reportlets folder under the %FR_HOME%\webroot\WEB-INF directory.

    Edit the parameter pane, add a Button widget, and modify Widget Name and Button Name to Export.

    Setting Widget Event

    Select the Export button, choose Widget Setting > Event > Add Event, and set the event type to Large Dataset Export.

    The setting items are described in the following figure.

    ·        File Name: Export Example One

    ·        Format: Excel

    ·        Dataset: ds1

    ·        The type of the Region parameter is String, and the value is California.

    ·        Export Column: Region, Salesperson, and Product Type

    Demonstration

    Save the template, click Pagination Preview, and click the Export button to export the Export Example One file whose region is California.

    Example Two: Exporting Dynamic Parameter Value Through Large Dataset Export Plugin

    Setting the Template

    Open the GettingStarted.cpt template in the reportlets folder under the %FR_HOME%\webroot\WEB-INF directory.

    Edit the parameter pane, add a Button widget, and modify Widget Name and Button Name to Export.

    Setting Widget Event

    Select the Export button, choose Widget Setting > Event > Add Event, and set the event type to Large Dataset Export.

    The setting items are described in the following figure.

    ·        File Name: Export Example Two

    ·        Format: Excel

    ·        Dataset: ds1

    ·        The type of the Region parameter is Formula, and the value is $region. In this case, the exported parameter value is determined by another parameter widget.

    ·        Export Column: Region, Salesperson, and Product Type

    Demonstration

    Save the template, and click Pagination Preview. The exported parameter values in Excel are determined by the parameter values of the drop-down box widget.

    Select California in the drop-down box to export the Export Example Two file whose region is California.


    Attachment List


    Theme: Report Application
    • 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