File dataset parameter filtering

  • Last update:June 06, 2025
  • Overview

    Version

    Report Server VersionFunctional Change

    11.0

    /

    Application Scenario

    In some cases, you may want to use a file as the dataset, enter a parameter value in the widget on the parameter query page, and click the query button to query data, as shown in the following figure. How to realize the effect?

    1.png

    Implementation Method

    You can bind the corresponding column of a file dataset in Data Dictionary for a drop-down box widget. In this case, you can query data by parameter filtering.

    Example

    Data Preparation

    Download the file Parameter Filtering in a File Dataset.xlsx, and place the file in %FR_HOME%\webroot\WEB-INF\reportlets\.

    Create a general report and create a file dataset File1, as shown in the following figure.

    2.png

    Template Design

    Parameter Setting

    1. Choose Template > Template Parameter, and add three template parameters, namely str, end, and region, as shown in the following figure.

    3.png

    2. Click  to enter the parameter editing panel, click Add All, and set the widget values of the label widgets to Start, End, and Region, respectively. Select Date Widget, Date Widget, and Drop-down Box Widget, respectively, as shown in the following figure.

    4.png

    3. Set Data Dictionary for the drop-down box widget of Region, as shown in the following figure.

    5.png

    Report Design

    1. Drag the corresponding fields into the cells below the cells where Order ID, Customer ID, Order Date, and Region are located, as shown in the following figure.

    6.png

    2. Double-click cell A2, and set the filter attribute, as shown in the following figure.

    7.png

    iconNote:

     1. You need to modify String to Parameter for the value of the filter condition and then select the corresponding parameter name.

    2. The filter attribute has the same function as that of the SQL statement: where #5='$area' and #3 between '$str' and '$end'.

    3. #3 and #5 represent the column indexes of the file dataset. The actual values should correspond to the specific dataset you use.

    Effect Display

    PC

    Save the template and click Pagination Preview. Then the preview effect is shown in the following figure.

    8.png

    Mobile Terminal

    The following figure shows the preview effect on the DataAnalyst app and the HTML5 terminal.

    最后一张.jpg

    Template Download

    For details, you can download the template Parameter Filtering for a File Dataset.cpt.

    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