Collapse AllExpand All

4.4. Defining Parameters

For our example we will create two parameters. One of them, if present, will cause the report to display call information for all callers. The other enables the user to select a specific caller for whom to display information. We already identified these parameters when we created the report's query using the MetaSQL Editor.

To define parameters click on the Document menu and select the Defined Parameters option. Then click the ADD button to add a parameter called All_ID. Below is an example of the All_ID parameter:

Static Parameter example

The information we entered for the All_ID parameter is explained below:

Name

The name of the MetaSQL parameter as it appears in the report's query.

Type

The format of the parameter. The following formats are possible: String, Integer, Double, and Boolean.

Active

Specifies whether the parameter is active by default at run time in the report renderer.

Default

The default value for the parameter at run time.

Description

A description of the parameter for use internally.

Defined List

A static or dynamic list of options which the user.

The next parameter, Caller_ID, uses the Dynamic option for the Defined List capability:

Dynamic Parameter example

Note

A static defined list enables you to define a discrete list of options which the user may chose from at run time. A dynamic defined list utilizes a SQL query that is executed at run time so that the user can see a dynamic list of options.

In the example shown, you can see the query we have entered will return the key value (i.e., ContactID) in the first column and the last name in the second column. Ultimately, the user will not see the ContactID. It is the second column that is the label the user can click on at run time to determine the value of the parameter sent to the report definition when the report output is generated.

So, the Parameter List screen now includes two parameters, as shown below:

Parameter List

It is now time to save the report definition.