Overview
Application Scenario
You can query the parameter information by using the widget bound to the template parameter.
For example, entering a specific region in the text box allows you to query the data for that specific region.
You can enter California in the text box, and click the Query button to view the sales information for California in the report, as shown in the following figure.
You can enter New York in the text box, and click the Query button to view the sales information for New York in the report, as shown in the following figure.
Function Description
1. Template parameters are specific to the current report and need to be used in conjunction with the filtering conditions of the data columns.
2. Template parameters are suitable for a small amount of data. You can retrieve all data through the dataset, then set the template parameters in the report, and use these template parameters to filter out useful data during data queries.

1. For a large amount of data, you can use the Dataset Parameter to filter data.
2. Template parameters do not support the Value function by default.
Example
Template Creation
Create a general report, as shown in the following figure.
Data Preparation
Create a dataset named ds1, and enter the SQL query statement SELECT * FROM Sales_Volume in the database query dialog box to retrieve all data from the table Sales_Volume, as shown in the following figure.
Report Design
1. Enter text into cells A1 to C1, drag corresponding data columns into the cells, and design the report as shown in the following figure.
2. Select cell C2, click Cell Element on the right attribute panel, and select Summary and Sum from the drop-down list of Data Setting, as shown in the following figure.
Template Parameter Defining
1. Choose Template > Template Parameter on the designer menu bar to bring up the setting dialog box. Click the Add button to create a template parameter, double-click the parameter, rename it Region, and set Default Value to California, as shown in the following figure.
2. Double-click the original name to enter edit mode if you want to modify the template parameter name, and click OK after modification, as shown in the following figure.
Parameter-Widget Binding
1. Click the button on the parameter panel to enter the parameter panel editing page. Click Region or Add All to add the parameters displayed on the Component Setting panel in the upper right corner to the parameter panel, as shown in the following figure.

2. Click the button of the custom widget, and select Text Widget. The parameter is bound to the text widget, as shown in the following figure.

3. Drag the Query button to the left to create a compact layout, making the widget panel more aesthetic, as shown in the following figure.
4. Click the button on the parameter panel again to complete the settings for the parameter panel, and return to the report design page, as shown in the following figure.
Data Filtering Setting
After setting up the widgets, you still cannot query the sales information for the specified region by entering parameter values in the text box. Since the table data is retrieved from the dataset ds1, which retrieves all data from the database, you need to add filter conditions to the table in order to query information by entering parameter values in the widget.
Double-click cell A2,click Filter in the pop-up dialog box Data Column, and add a common condition. Set the Available Column to Region and Operator to Equal to, select Parameter and $Region in the drop-down list, and click the Add button and then OK. In this way, you can then bind the region cell to the parameter, as shown in the following figure.

When the parameter is empty, the query results will also be empty. For details about how to retrieve all data when the parameter is empty, see When Value of Drop-down Box is None, Show All Data.
Effect Display
Save the report and click Pagination Preview.
Enter California in the text box andclick the Query button to view the sales information for California in the report, as shown in the following figure.
Enter New York in the text box and click the Query button to view the sales information for New York in the report, as shown in the following figure.
The effect and be previewed on both the DataAnalyst app and HTML5 terminal
Enter California in the text box and click the Query button to view the sales information for California in the report, as shown in the following figure.
Enter New York in the text box and click the Query button to view the sales information for New York in the report, as shown in the following figure.
Template Download
For details, you can download the template:Template Parameter.cpt.