Parameters Panel
- 2 minutes to read
The Parameters panel allows the user to fine-tune a mail-merge report by providing a required parameter. To create a panel, click the SpreadsheetControl’s smart tag and select Create Parameters Panel in the invoked SpreadsheetControl Tasks menu.
To create a parametrized query, you can use the built-in Query Builder dialog, as shown below.
In the External Data Sources group, select Manage Queries from the Manage Relations drop-down menu.
In the Manage Queries dialog, click the ellipsis button in the query list to edit the selected query.
In the invoked Query Editor window, click the Run Query Builder… button.
In the Query Builder window, click Filter …
… to invoke the Filter Editor dialog, which allows you to specify a filtering criterion to be applied to the source data.
Click OK to close the Filter Editor dialog, and then click OK to close the Query Builder window.
Click Next in the Query Editor dialog to navigate to the page that allows you to configure query parameters. This page is shown in the image below.
Select the check box in the Expression column to specify an expression to calculate the parameter value. Map the query parameter to a new spreadsheet parameter. To do this, expand the drop-down list for the Value column and select the New Spreadsheet Parameter… item.
In the invoked Spreadsheet Parameter dialog, you can specify the required parameter settings (its name, type and initial value).
At runtime, the Parameters panel displays query parameters and allows end-user’s to modify them. The following picture illustrates how to specify the order ID using the Parameters panel.
The resulting report displayed for the order ID equal to 10300 is shown below.