beautypg.com

Performance considerations for all reports, Consideration 1 – HP Intelligent Management Center Standard Software Platform User Manual

Page 674

background image

The number of records read by each subreport remains the same
regardless of whether there was range limit selection on Table A. Each
subreport will read only those records in Table B that match each record
read in Table A (100).

Performance considerations for all reports

Consideration 1

With both data files and SQL databases, the program parses the entire
selection formula and passes down whatever parts of the criteria it is able
to translate (pass), wherever they may physically appear in the formula.
Thus, if the formula finds criteria it can pass, then criteria that it cannot, then
criteria that it can, it passes down the first part, skips the second, and then
passes down the third.

In the case of data files, the program passes down the criteria that it can
to the database translation layer.

In the case of SQL databases, the program passes down to the server
the criteria that it can in the form of a WHERE clause.

While there are exceptions, as a general rule the program can pass down
any part of the record selection formula that compares a field with a constant.
Typically, this means that it can pass down any kind of record selection
criteria that can be set up in the Select Expert (equal to, one of, less than,
greater than, less than or equal, greater than or equal, between, starting
with, or like constant).

There are two special selection formula situations that you need to consider.
In these situations, the record selection formula includes multiple conditions,
some of which can be passed down while others cannot.

AND situations

{customer.REGION} = "CA" and
{customer.CUSTOMER ID}[3 to 5] = "777")

In this situation, the program sees that it can pass down the condition
before the And operator but not the condition after. Since the only records
that will meet the second condition will have to meet the first as well, the

674

Crystal Reports 2008 SP3 User's Guide

Understanding Databases

25

Linking tables