Share via


Create Parameter Field Dialog Box

Use the Create Parameter Field dialog box to create a parameter field that you can use in a formula, in a record selection formula, or in the body of the report itself.

This dialog box appears when you right-click Parameter Fields in the Field Explorer and click New.

Note

This dialog box is the same as the Edit Parameter Field dialog box. This description applies to both dialog boxes.

Name Enter the name you want to assign to the parameter field in this box. This is the name that will appear in the Fields list in the Formula Editor and it will be used to identify the field when the field is used in the report or in a formula.

Note

When a parameter field name appears, the program puts a question mark at the beginning of the name, to identify it as a parameter field. Thus, if you name a parameter field "Prompt 1," the name will appear in the field list in the Formula Editor as "?Prompt1."

Prompting text Enter the text you want the program to use for your prompt into this box.
Value type Select the data type of the parameter field from this list.

If you select Date or DateTime for your parameter's Value type, you can alter the default date/time formats in the Fields Tab (Default Settings) of the Default Settings dialog box.

All Parameter Value Types Except Boolean

Allow multiple values By selecting the Allow multiple values check box, you can select more than one default value for your parameter field.
Discrete value(s) 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 will be able to select more than one discrete value for your parameter field, though those discrete values will continue to function singularly as opposed to a range value.
Range value(s) By selecting the Range value(s) option, you can select a range of values for your parameter field.
Discrete and Range Values This option is only available if you select the Allow multiple values check box.

Selecting this option enables you to choose both discrete and range values for your parameter field.

Default Values Click the Default Values button to set the default prompt settings for the parameter field you are creating.
Allow editing of default values when there is more than one value This check box is, by default, selected. With the check box selected, you can edit values in the parameter field after the parameter field has been added to the report.

Boolean Parameter Value Types

Place in parameter group Select the Place in parameter group check box to add your Boolean parameter field to a group. When users select a group of Boolean parameters, they can assign the same or different values to each item in the group (this behavior is controlled by the Group is exclusive option).
Parameter group number Use this field to enter the number of the group you want to add the current Boolean parameter to.
Group is exclusive Select this check box to ensure that users can choose only one Boolean parameter from a given group to have True values. All other parameters in the same group automatically become False.

If you clear this check box, users can combine Boolean parameters from several different groups and select which are to be True.

Default Values Click Default Values to set the default prompt settings for the parameter field you are creating.

Dynamic Cascading Parameters

Both dynamic prompts and cascading lists of values are available in Crystal Reports Developer. These features let you populate the lists of values associated with a prompt from a data source outside of your report. A dynamic prompt can include a cascading list of values; that is, you can create a prompt whose final value is determined through a sequence of choices. For example, users might first be prompted to pick a country before the choices for region appear. The users might then need to pick a region before the choices for city appear, and so on. For example, a list of countries could be a dynamic prompt, while a hierarchical list of countries, regions, and cities could be a dynamic prompt with a cascading list of values.

Note

The Dynamic Cascading Parameters feature is not available in Crystal Reports for Visual Studio, but is available in one of the upgraded versions. For more information about upgraded versions, see Upgrade Options.

See Also