beautypg.com

HP Intelligent Management Center Standard Software Platform User Manual

Page 671

background image

the database DLL (for PC data) or the server (for SQL data). See

Record

Selection

.

The second half of the selection formula, however, requires processing
that must be done in the Report Engine. It uses a built-in function to
manipulate and evaluate a field value and it cannot be done in the
database DLL or the server. The program does not pass this condition
to the database DLL.

If there is an index on Table A, and the range limit selection condition is
based on the indexed field ({customer.REGION} in this example), the
program goes directly to the record it is seeking in Table A (the first CA
record) and reads it.

For that record, the program locates the first matching record in Table
B, using the Table B index.

The program passes this merged record (A+B) back to the Report
Designer, which tests the record against the entire selection formula.

The program then reads the second matching record and passes the
merged record on, and then reads the third matching record, and so
on, until it has read all of the matching records.

The program then returns to Table A and reads the next record. There
is no need to test the record to see if it meets the CA condition; the
field is indexed and the records are in alphabetic order. But the
program tests the record to see if it goes beyond the "IL" condition
(for example, could the next record be from Mississippi or
Tennessee?). If the record is still within the specified range, the
program begins the matching process again for that record.

The program continues the process until it has located all targeted
Table A records and the matching Table B records.

To find two records in Table A and the 100 records in Table B that
match the Table A records, the program reads 200 records.

If there is no index on Table A, or if there is an index but the range limit
selection condition is not based on the indexed field, the program reads
the first record it finds.

For that record, the program uses the Table B index to locate the first
matching record in Table B.

Crystal Reports 2008 SP3 User's Guide

671

25

Understanding Databases

Linking tables