Operation Manual

Record Selection
Troubleshooting record selection formulas
9
Crystal Reports User’s Guide 163
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” on page 144.
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.
u
To troubleshoot record selection formulas
1. Write down the record selection formula on paper. You will use this written
copy to help you reconstruct the selection formula one step at a time.
2. Remove the record selection formula from your report by deleting the
formula from the Record/Group Selection Formula Editor in the Formula
Workshop.
3. Click Close when finished in the Formula Workshop.
4. Make certain that all fields referenced in the record selection formula (the
selectors) are on the report physically and are not hidden.
For example, if one of the selectors is:
{customer.POSTAL CODE} > "80000"
but the {customer.POSTAL CODE} field is not used on your report (as in
the case of a sales report that uses the postal code to define territories
but does not include the postal code in the report data), then insert the
{customer.POSTAL CODE} field into the report.
Or, if one of the fields referenced in the selection formula is on the report
but is hidden, unhide it by deselecting the Suppress option in the Format
Editor for that field.