User`s guide

Total Records
Read
For each A
reads in B
Reads A
Selection Formu-
la
Linking/Subre
port
2600100 (26*100)26NoSubreport
200100 (2*100)2YesSubreport
23.5.4 Data file considerations
When working with data files, one-to-many links can occur when you link tables in a single report or
when you add a subreport to your report.
23.5.4.1 Linking data files
When retrieving data from linked data files in one-to-many situations, the program uses the following
process:
If there is a selection formula, the program parses the selection formula and passes what it can
down to the database DLL. This is generally range limit information. Consider the following record
selection formula:
{customer.REGION} in "CA" to "IL" AND
Remainder ({customer.CUSTOMER ID},2)=0
In this formula, the part before the "and" operator contains range selection criteria for the Region
field. The region must fall alphabetically between "CA" and "IL." The program passes this kind of
condition down to either 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.
2012-03-14524
Understanding Databases