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.

SpreadsheetControl_MailMerge_AddParametersPanel

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.

    SpreadsheetControl_MailMerge_ ManageQueries

    In the Manage Queries dialog, click the ellipsis button in the query list to edit the selected query.

    SpreadsheetControl_MailMerge_ ManageQueriesWindow-OrderDetails

  • In the invoked Query Editor window, click the Run Query Builder... button.

    SpreadsheetControl_MailMerge_ParametersQueryEditor01

    In the Query Builder window, click Filter ...

    SpreadsheetControl_MailMerge_ParametersQueryEditor14

    ... to invoke the Filter Editor dialog, which allows you to specify a filtering criterion to be applied to the source data.

    SpreadsheetControl_MailMerge_ParametersQueryEditor15

  • Click OK to close the Filter Editor dialog, and then click OK to close the Query Builder window.

    SpreadsheetControl_MailMerge_ParametersQueryEditor_PageNext

  • 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.

    SpreadsheetControl_MailMerge_ParametersQueryEditor02

    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).

    SpreadsheetControl_MailMerge_NewSpreadsheetParameter

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.

SpreadsheetControl_MailMerge_ParametersPanel

The resulting report displayed for the order ID equal to 10300 is shown below.

SpreadsheetControl_MailMerge_ParametersResult