User`s guide
• 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.
23.5.5 SQL database considerations
Since indexes are not critical with SQL data, the primary concern with both linked tables and subreports
is whether or not there is a selection formula in the primary report that puts range limits on Table A.
See Linking data files .
23.5.5.1 Linked SQL tables
If there are range limit conditions in the selection formula, the program passes those conditions down
to the server.
• If there is a selection formula that puts range limits on Table A, the server locates the records in
Table A that satisfy the selection criteria (2), matches them up with the appropriate records in Table
B (100), and returns 200 merged records to the Report Engine.
• If there is no selection formula, or if there is a selection formula that does not put range limits on
Table A, the server matches up each record in Table A (26) with the appropriate records in Table
B (100), and returns 2600 merged records to the Report Engine.
In either case, the Report Engine will then apply the entire selection formula to the merged records.
23.5.5.2 Subreports and SQL databases
If you are creating a primary report based on Table A and a subreport based on Table B:
• The number of subreports that are run is determined by the selection formula situation in the primary
report:
• If there is a selection formula and it passes down range limits on Table A, the program runs a
subreport only for those records that satisfy range limit conditions (2).
2012-03-14526
Understanding Databases