Today we will learn about two kinds of parameter filtering of Finereport business intelligence tool. It can be divided into template parameter and data set parameter based on different types of parameters.

1. Description

Input parameter value in the parameter query interface control in report designer. Click Query button to query corresponding data. This process is called parameter filtering.

Parameter filtering can be divided into template parameter and data set parameter based on different types of parameters.

2. Filter template parameters

After the template parameter is bound to the control, there is no association operation about data query. That means, if a direct page break preview is made, the parameter values in control will not be filtered in data query.

At this time, you need to filter the parameters in data column filter conditions of report body.

As shown below, for the imported parameter “amount”, the data to be obtained is “Total Sales Volume > (Parameter value -500)”, you can process parameters via formula:

After operation, preview the template again and you can filter the parameters.

3. Filter data set parameters

Different from template parameter, when defining the data set like SELECT * FROM TableName WHERE ColName = ${para}, where ${} content is a variable, i.e., data set parameter, FineReport will form the ${} content into a character string and stitch it to the SQL to form a final executable query after computing, which will be sent to the database end for execution. ${} can directly filter the data.

If it is necessary to add a fixed string for incoming parameter before filtering, the sql can be written as SELECT * FROM [user password] where password =’${password+”123″}’.

For this reason, no further operation is required after binding the data analysis for data set parameter control, and you can directly preview template and view effect.