User`s guide

These templates can be used as they are (with your own data), or they can be combined to create
complex formulas.
7.3 Pushing down record selection to the database server
The drivers provided with Crystal Reports for SQL data sources allow "pushing down" record selection
to the database server. When you specify a record selection formula in a report based on an SQL data
source, Crystal Reports analyzes it, generates a SQL query from it and passes the SQL query to the
database server. Record selection is then carried out in two stages:
The first stage of record selection takes place when the database server processes the SQL query
and returns a set of records to Crystal Reports.
In the second stage, Crystal Reports further evaluates locally the record selection formula for the
set of records returned from the database server.
Since database servers are usually faster machines than workstations, it is to your advantage to specify
record selection formulas that can be processed by the server in the first stage. Doing so minimizes
record selection on the local machine in the second stage. This process is commonly known as "pushing
record selection down to the database server." The following kinds of record selections can be pushed
down to the server:
Selections with indexed and non-indexed fields (indexed fields provide faster response).
SQL queries with AND and OR clauses.
SQL expression fields that carry out formula calculations for record selection. (For the types of SQL
expressions supported by your SQL server, consult the documentation provided with the server.)
For complete details on pushing your record selection formulas down to the database server, see
Using enhanced record selection formulas .
7.4 Troubleshooting record selection formulas
To troubleshoot your selection formula, you should first begin by making sure that all of the fields
referenced in the selection formula are placed on your report. Then delete the selection formula and
test it as you rebuild it, step by step.
7.4.1 To troubleshoot record selection formulas
2012-03-14137
Record Selection