Operation Manual

Building Queries
Query filters and prompts
18
356 Crystal Reports User’s Guide
u
To add a predefined filter to a query
1. Double-click the objects you want to use in your report, or drag them to
the Results Objects pane.
For step-by-step instructions on selecting objects to build a query, see
“Defining the data selection for a query” on page 352.
2. Drag a predefined filter to the Query Filters pane.
When you run the query, the data corresponding to the query filters you
selected is returned to the report.
Note: Predefined filters are created and edited by your administrator. As a
user of the Query Panel, you cannot view the component parts of predefined
filters, neither can you edit them.
u
To create a custom filter using the Filter Editor
1. Select the object you want to filter and drag it to the Query Filters pane.
The Filter Editor appears. The name of the object you selected is
displayed beneath the “Filtered object” text.
2. Select an Operator from the list.
For a description and example of each operator, see “Quick reference to
query filter operators” on page 364.
3. Select Constant or Value(s) from list.
4. Depending on the operator you selected, type a single value or multiple
values in the Type a value field.
5. Click OK to confirm the properties of the custom filter.
The new filter displays in the Query Filters pane.
Building prompts
A prompt is a dynamic filter that displays a question every time you refresh
the data in a report. You respond to prompts by typing or selecting the
value(s) you want to view before you refresh the data. Crystal Reports
retrieves only the values you specified from the database and returns those
values to the report.
Tip: Prompts allow multiple users view a single report but specify a different
sub-set of the database information. Prompts also reduce the time it takes for
the data to be retrieved from the database.