Operation Manual

Parameter Fields and Prompts
Advanced parameter features
23
Crystal Reports User’s Guide 465
2. If applicable, select the Min Length and/or Max Length options to
designate the length of the field.
For a Currency or Number parameter field, options for entering the
“Min Value” and “Max Value” appear.
For a Date, DateTime, or Time parameter field, options for entering
the “Start” and “End” values appear.
Incorporating a parameter into a formula
1. On the View menu, click Field Explorer.
The Field Explorer appears.
2. Select Parameter Fields and click New.
The Create New Parameter dialog box appears.
3. Create a parameter field and save it.
4. Select Formula Fields and click New.
The Formula Name dialog box appears.
5. Enter the name of the formula, and then click OK.
6. Create a formula using the parameter field as you would any constant
value. For example, rather than creating a formula that hard-codes the
country name:
{customer.COUNTRY} = “USA”
Use a parameter field instead of “USA”.
{customer.COUNTRY} = {?Country}
To do this double-click the database field, press =, then double-click the
parameter.
Tip: Identify parameter fields easily by looking for (?).
7. Click Close on the Formula Workshop.
The Field Explorer dialog box appears. The name of the formula you
have just created is highlighted in the Formula list box.
8. Drag and drop the formula into the report.
9. Click Refresh to generate the report.
A dialog box appears, prompting you for values.