User`s guide

The SQL query generated will send all 2192 records to Crystal Reports, and then the record selection
formula will reduce this to 181. To see this, click Show SQL Query on the Database menu and notice
that the SQL query has no WHERE clause. This is because Crystal Reports is not able to push down
the Year ( ) function in the WHERE clause.
On the other hand, this record selection formula generates the same report:
{Orders.Order Date} < #Jan 1, 2001#
This second formula, however, can be performed on the database server, so it is pushed down. The
SQL query generated will send only 181 records to Crystal Reports. So, when the record selection
formula is evaluated by Crystal Reports, no further records need to be eliminated. Click Show SQL
Query on the Database menu and notice that the resulting SQL query has a WHERE clause.
As this example shows, your report's processing speed improves when you enhance your record
selection formula. In this case, both formulas generate the same report, but the second takes advantages
of the power and optimizations that the database server can use when handling its own data.
Tip:
See the next section for additional information and limitations when setting up record selection requests.
Note:
If you are new to record selection formulas, you may prefer to begin with the Select Expert or the sample
record selection formula templates. For further details, along with an introduction to record selection,
see Selecting records.
6.5.2 Record selection performance tips
Consider the following performance-related items when setting up record selection requests:
6.5.2.1 General
To push down record selection, you must select "Use Indexes or Server for Speed" in the Report
Options dialog box (available on the File menu).
In record selection formulas, avoid data type conversions on fields that are not parameter fields.
For example, avoid using ToText( ) to convert a numeric database field to a string database field.
You are able to push down some record selection formulas that use constant expressions.
2012-03-14120
Designing Optimized Web Reports