Manipulating Parameter Properties

Objective

After completing this lesson, you will be able to manipulate parameter properties to improve the user experience.

Common Parameter Properties

The Create New Parameter dialog box allows you to define Parameter Properties. Some of these properties depend on the specific data type of the parameter that you create. The following figure shows the dialog box for a New Parameter with the Data Type String.

A software dialog titled Edit Parameter: Country Selected shows a parameter configuration form in a desktop application with fields indicating Name = Country Selected, Type = String and List of Values = Static, a central list of values containing USA, China, Germany and a Click here to add item row, a lower Value Options table showing settings such as Prompt Text Enter Country Selected:, Allow custom values = True, Allow multiple values = False, Allow discrete values = True, and standard OK, Cancel and Help buttons at the bottom.

Parameter Properties

Name
Enter the name that you want to assign to the parameter field in this box (the name My Parameter is added by default). This is the name that appears in the Parameter Fields list of the Field Explorer dialog box and in the Fields list in the Formula Editor dialog box. This name is also used to identify the field when the field appears in the report or in a formula.
Type

Select the data type of the parameter field from this list. For example, if you're going to be prompting for a value in a numeric field, select "Number."

If you select Date or DateTime for your parameter's value type, you can alter the default date/time formats by using the Options command from the File menu.

Note

This option is available only for parameters with static prompts.
List of Values area

Static: A static prompt is one that always contains the same values. For example, if your parameter prompts for a country value, you could create a static prompt because the country list represents a set of values that doesn't change often.

Dynamic: The values of a dynamic prompt are retrieved from the data source and are not stored within the report. For example, if you're prompting for customer name, you could create a dynamic prompt because the names in your customer database probably change frequently.

Value field

Click this list to pick a database field that provides the prompt values for your parameter field.

Description field

Click this list to pick a database field that provides the prompt descriptions for the values for your parameter field.

Show on (Viewer) Panel

By selecting one of the "Show on (Viewer) Panel" Options, you can choose if the parameter is visible on the Viewer Panel or not. This option is explained in more detail under Parameter Panel Option on one of the following pages.

Prompt Text

Enter the text that you want the program to show your users as a prompt. For example, if you're prompting for a state value, you might want to enter a prompt like "Enter the state that you want sales data for." For a Static prompt, the program adds the phrase "Enter <Parameter Name>:" by default.

Prompt with Description Only

Choose whether your user should be prompted with only a description (True) or both a value and its description (False). By default, the program sets this field to False.

Optional Prompt

Set this to true if you want to allow the user to bypass entering a value for this parameter.

Default Value

Add a value to this field if you want a default value to appear when the program prompts your users to select a value.

Allow multiple values

By selecting the "Allow multiple values" checkbox, you can choose more than one default value for your parameter field.

Allow Discrete values

By selecting the "Discrete value(s)" option, you can select only discrete, or singular, values for your parameter field. If you have "Allow multiple values" selected, you'll be able to select more than one discrete value for your parameter field, though those discrete values continue to function singularly as opposed to a range value.

Allow range values

Use the "Allow range values" field to select a range of values for your parameter field. For example, if you've selected a currency field, your parameter field (with range value selected) could equal any number that falls between $10,000 and $100,000. When this field is set to True, the prompt allows range values. The field defaults to False.

Min length

Use the "Min length" field to limit the minimum number of characters that can appear in your parameter field. For example, if you choose the number 4 as your minimum length limit, the name of customer Dan couldn't be used because it's fewer than four characters long.

Max length

Use the "Max length" field to limit the maximum number of characters that can appear in your parameter field. For example, if you choose the number 5 as your maximum length limit, the name of customer Margaret couldn't be used because it's more than five characters long.

Edit mask

Use the "Edit mask" field to create an Edit Mask for your parameter. The Edit Mask can be any of a set of masking characters used to restrict the values you can enter as parameter values (the edit mask also limits the values your users can enter as prompting values).

Show Value or Description

The setting "Show Value or Description" will display either the value or the description of a parameter field placed in the report for the selected value.

Apply Common Parameter Properties

In this exercise, you will apply common parameter properties.

Summary

  • The Create New Parameter dialog box allows defining parameter properties, which vary based on data types such as String or Number.
  • Parameters can be either static with fixed values or dynamic with values pulled from a data source.
  • Users can customize options like prompt text, mandatory input, allowing multiple values, and setting default values.