beautypg.com

Subreports and data files – HP Intelligent Management Center Standard Software Platform User Manual

Page 672

background image

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

The program then locates the second matching record in Table B and
passes that merged record back, then the third record, and so on, until
it has located, merged, and passed back all the records in Table B
that match the first record in Table A.

The program then moves on to the next record in Table A and begins
the matching and merging process all over again.

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

Subreports and data files

If your primary report is based on Table A, the subreport is based on Table
B, and the records are linked, your primary considerations are as follows:

The number of subreports that are run by the program is determined by
the index and the selection formula situation in the primary report:

If Table A is indexed, and if the primary report has a selection formula
that passes down range limit conditions for the indexed field, the
program runs two subreports.

If Table A is not indexed, or if Table A is indexed but the selection
formula does not pass down range limit conditions for the indexed
field, the program runs 26 subreports.

The number of records read for each subreport is determined by the index
situation on Table B:

If you have an index on Table B, the program will read only the
matching records (100) when it runs a subreport.

If you do not have an index on Table B, the program will always read
every record in Table B (2600) when it runs a subreport.

672

Crystal Reports 2008 SP3 User's Guide

Understanding Databases

25

Linking tables