Overview
Version
| Report Server Version | Functional 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?

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.

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.

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.

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

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.

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

Note: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.

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

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