I.Overview
1) Application sscenarios
In some cases, users want to use files as data sets, input parameter values in the widget of the parameter query interface, click the query button, data query, how to achieve it? As shown below:
2) Implementation roadmap
You can query data by setting the corresponding column of the data dictionary bound to the file data set in the drop-down box and filtering parameters.
II.Example
1.Data preparation
Create a new file dataset File1, as shown below:
Note: you need to place the file under %FR_HOME%\webroot\WEB-INF\reportlets\and click to download the file:
File_dataset_parameter_filtering.cpt
2.Template design
1) Parameter settings
Create a general report and click Template>Template Parameters.Create three template parameters: str,end, and area, as shown below:
Edit the parameter panel, add the date widget and drop-down box widget, and bind the widget values str, end and area in turn, as shown below:
Set the data dictionary for the drop-down box area, as shown below:
2) Report design
Bind Order ID, Customer ID, Order date and Area in sequence, as shown below:
Double-click A2 cell to set filter properties, as shown below:
Note 1: The value of the filter condition needs to be changed from the string to a parameter and then the corresponding parameter name.
Note 2: Filter attributes are similar to SQLwhere #5='$area' and #3 between '$str' and '$end'
Note 3: #3 and #5 refer to the column number of the file data set. The specific value is subject to the file data set itself.
3.Effect preview
1) PC
Save the template and select Pagination Preview as shown below:
2)Mobile
The end effect of App and HTML5 is as follows:
III. Download the template
The template is complete, see: %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\Parameter\
File_dataset_parameter_filtering.cpt
Click to download the template:
File_dataset_parameter_filtering.cpt