Crystal Reports  

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

Set default values
Click the Set default values button to set the default prompt settings for the parameter field you are creating.
Allow editing of default values
The Allow editing of default values check box is, by default, selected. With this 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.

Set default values
Click the "Set default values" button to set the default prompt settings for the parameter field you are creating.

See Also

Setting Parameters | Limiting Entry Type and Format in Parameters | Incorporating Parameters into Formulas | Field Explorer