Operation Manual

Parameter Fields and Prompts
Creating a parameter with a cascading list of values
23
Crystal Reports User’s Guide 451
Creating a parameter with a cascading
list of values
A dynamic prompt can include a cascading list of values, which adds additional
levels of selection for your users. For example, if you are prompting for a city
value, but you also need to know which country and region that city comes
from, you could create a dynamic and cascading prompt. In this case, you first
prompt for a country, and when that value has been selected, the program
prompts for a region by showing only the regions that apply to the selected
country. Finally, when a region value has been selected, the program prompts
for a city by showing only the cities that apply to the selected region. In this way,
you can be sure that your user picks the correct city (for instance, Vancouver,
Washington, USA rather than Vancouver, British Columbia, Canada).
As with a dynamic prompt that has only one value, you are able to create or
specify a cascading list of values that you can schedule for updates as often
as you like through the Business View Manager. For more information about
scheduling a list of values, see the Business Views Administrator's Guide.
Use the following steps to create a parameter that uses a dynamic prompt
and a cascading list of values.
u
To create a parameter with a cascading list of values
1. Open the sample report called Group.rpt.
Sample reports are located in the Crystal Reports directory under
\Samples\En\Reports.
2. On the View menu, click Field Explorer.
The Field Explorer dialog box appears.
3. Select Parameter Fields and click New.
The Create New Parameter dialog box appears.
4. Enter a name for the parameter in the Name field (up to 255
alphanumeric characters).
This example uses Supplier City.
5. In the List of Values area, click Dynamic.
6. Enter prompting text for your prompt group in the Prompt Group Text field.
This example uses “Choose the City that your supplier is located in.”
Note: Prompt groups let you use cascading list of values for other
cascading prompts. For example, if you set up such a list of values for an
address prompt, you might want to use the list for both shipping and
billing addresses. In this case, you could create two prompt groups for
the same list of values; you might call one prompt group Shipping
Address and the other Billing Address.