User`s guide

21.1.4 Optional parameters
Crystal Reports supports optional parameters. An optional parameter is a prompted value that does
not have to be supplied by the user.
Report designers should provide some guidance to the end user that a parameter is optional by adding
this information to the prompt text.
Optional parameters are treated by Crystal Reports as optional anywhere within the report that they
are used. You cannot set one instance of the parameter to optional and another to mandatory.
Note:
After you set a parameter to optional, if you use the "Select Expert", the system will automatically
add the selection formula for you using the HasValue() function.
The "Formula Workshop Editor" does not automatically add the formula. Only the "Select Expert"
automatically adds the formula for you.
If you change the parameter from optional to mandatory, the HasValue() function is not automatically
removed from your formula.
Handling a parameter with no value
When the report engine evaluates any formula which references an optional parameter that does not
have a value, it generates a runtime error. All formulas that reference an optional parameter should
first use the HasValue() function to check if that parameter has a value before evaluating it. This
includes record selection formulas and saved data formulas.
Note:
The system will not automatically drop a statement from the SQL WHERE clause. It is the report
designer’s responsibility to decide which statement to leave out based on HasValue() testing.
21.2 Understanding dynamic prompts
Both dynamic prompts and cascading lists of values are available in Crystal Reports. These features
let you populate the lists of values associated with a prompt from a data source outside of your report.
(Static lists of values that are stored in your report are also available in Crystal Reports.)
This dynamic capability is available to all Crystal Reports users—whether or not they have the added
capabilities of SAP BusinessObjects Business Intelligence platform. When Crystal report files are stored
in SAP BusinessObjects Business Intelligence platform, additional dynamic prompting features are
available. The following table shows which features are available with each product.
2012-03-14454
Parameter Fields and Prompts