I. Overview
1) Expected Effect
The main function of parameters is to realize real-time interaction between users and data, that is, to filter data. We can use parameters in a variety of situations, such as referencing parameters in cells for dynamic captions, displaying different values based on parameter values, and so on. As shown below:
2) Implementation Roadmap
Using the formula, the parameter is referenced by [$parameter name]to achieve data filtering.
II. Examples
1.Templates Preparing
1) Create a regular report, create a dataset ds1, and the SQL statement is: SELECT * FROM Sales_Volume.
2) Click [Template > Template Parameter]and add [Region]. The default value is"North China". As shown below:
3) Merge cells A1-C1 and add the formula: $Region + "Sales", as shown in the figure below:
2.Widgets Setting
1) Adding widgets
Add label widget, drop-down box widget, query widget, as shown below:
2)Setting widgets
Select the label widget with the value of "region:", as shown below:
Select the drop-down box widget, the widget name is "region", the data dictionary type is set to "Data Query", the dataset is ds1, the actual value is the same as the displayed value, column number 1. Or select the Column Index, and the actual value and display value are region, as shown below:
3. Adding Filter
Double-click A3 cell to add filter criteria, as shown below:
4.Effect Viewing
1)PC
Save the template and click "Pagination Preview" to see what it looks like in Section Iof this article.
2)Mobile
The end effect of App and HTML5 is as follows:
III.Download Template
For the completed template, see: %FR_HOME% webapps\webroot\WEB-INF\reportlets\doc-EN\Primary\Parameter\Parameter_Reference1. cpt
Click to download the template: