Specifications

www.evisions.com Argos - Argos Report Writers Guide Page 71 of 118
Document Version 1.0 Last Updated 10.18.2010
Using Sub-Detail Bands
Example 8
Introduction
The use of Sub-Detail Bands increases the Band Editor’s functionality by allowing sub-
reports that provide additional information for each record in the Detail Band.
A Sub-Detail Band prints one dataset while being linked to another dataset (called the
Master). As each record is printed in the Master dataset, Argos will execute the dataset in
the Sub-Detail Band and print the Sub-Detail Band once for each row returned. Any
number of Sub-Detail Bands can be created and they follow the detail band.
In most cases, the Master dataset is the main Report Query (ArgosData). The dataset
displayed in a Sub-Detail Band is a different one than the Master dataset, in fact it can even
be from a different database (as long as both datasets have a common field that can be
used to link them).
Note: the Sub-Detail Band always prints after the Detail Band and will loop through
all records in its dataset before the Master dataset is incremented to the next record.
For this reason, this technique is less efficient than other methods and should be
used only when needs dictate.
You should use Sub-Detail Bands when:
You need to loop through two or more datasets for each row in the Detail Band.
Other methods only allow one dataset to be associated with each Detail Band.
You need to loop through one or more datasets for each row in the Detail Band, but
the data comes from a different database.
The Report Contents
In this example, Sub-Detail Bands will add additional information to an employee list. The
additional information will include employee contact information such as phone number,
email address, contact information, and dependent information. Each type of contact will
appear in its own Sub-Detail Band such that four Sub-Detail Bands will be associated with
the basic Employee information that appears in the Detail Band.
This example uses the Employee, Employee_Phone, Employee_Email,
Employee_Emerg_Contact, and Employee_Dependents tables within the sample
database.
Since four datasets are associated with and are printed immediately after the Detail Band,
the use of Sub-Detail Bands is required (other methods only allow one dataset to be linked
to a Detail Band).
The figure below shows the relationships of the tables within the sample database that are
used in this example.