Dataset Parameter

  • Last update:  2020-11-30
  • I. Overview

    1) Dataset parameters are used when creating DB Query datasets, their values are also used to filter data. Since the filtering process is completed when creating a dataset, using dataset parameters helps to improve the loading speed of reports and occupy less memory resources comparing to global parameters and template parameters.

    2) If bind a dataset parameter and a widget on the parameter pane, during the preview, report users can utilize the widget to define parameter value and filter data, and this process is parameter query.

    3) Dataset parameters can only be used by current template.

    4) FineReport owns a set of SQL statements to define dataset parameters specifically. During the use, you need to care about the data type of the parameter (e.g. the statement to define a string type parameter is different from that to define numeric type parameter).

    You will learn
    • Define dataset parameters

    • Add dataset parameters of different data types

    II. Steps

    1. Create a new dataset [ds1]

    1) Create a new DB query dataset.

    2) Input the SQL statement:

    SELECT * FROM Sales_Volume WHERE Region = '${region}'


    2. Click the refresh button to view the dataset parameter defined in the SQL

    1) Name of the parameter: region, default type: String.

    2) Set the default value of the parameter to East China.


    3. Preview the dataset

    1) Click Preview. The pop-up parameters setting dialogue box displays the default value of the parameter. Click [OK].

    2) The data in [ds1] is filtered.


    4. Modify the SQL statement of [ds1] to:

    SELECT * FROM Sales_Volume WHERE Region = '${region}'AND Sales_Volume > ${limit}

    5. Click the refresh button to view the dataset parameter defined in the SQL

    1) Name of the new parameter: limit.

    2) Modify the type to Integer. Input the default value: 200.


    6. Preview the dataset. The data in [ds1] is filtered


    7. Click the pen icon to edit the parameter pane


    8. A hint appears at the upper right corner

    This indicates that parameters [limit] and [region] have not been bound with widgets on the parameter pane.


    Attachment List


    Theme: Parameter
    • 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