User`s guide
• If there is no selection formula, or if the selection formula does not pass down range limits on
Table A, the program runs a subreport for every record in Table A (26).
• 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).
23.5.6 Performance considerations for all reports
23.5.6.1 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 program passes down the first condition, retrieves the data set that satisfies the
condition, and then applies the second condition only to the retrieved data. The rule for AND situations
is that the program passes down whatever conditions it can.
2012-03-14527
Understanding Databases