Beyond Two Tables

book list add book to my bookshelf create a bookmark purchase this book online

mastering crystal reports 9
Chapter 9 - Working with Multiple Tables
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

The examples and discussions of multiple tables up to this point have all involved two tables, one on the left and one on the right. What happens if you decide to use three tables in a report? Or four? Or more? Which table is the table on the left? Is there one? Do we need to think about things from a whole other perspective? Not really!

When tables are combined, they combine left to right. In the Database Expert, the order in which you add the tables determines the concept of left to right. Add the first table, and it is the left table; add the second table, and it is the table on the right. For more than two tables, the process of combining tables moves from left to right, pairing as it processes. This is graphically depicted in Figure 9.21.

click to expand
Figure 9.21. More than two tables

In this diagram, four tables are being linked. Table A was the first table added in the Database Expert. The second table, Table B, was added next. Table C was the third table added using the Database Expert. Finally, Table D was the last table added using the Database Expert.

Note 

The left-to-right order is determined by the order in which tables are added to the Database Expert.

The processing of the links combines the first two tables, A and B, and comes up with a temporary result that is saved in memory until it’s needed in its next calculation. The next calculation happens to be a link to a third table. So the result of the first join is treated as a virtual table itself and is then joined to the third table, C. Once these two are joined, the result of this operation is joined to the final table, D. The entire process results in a virtual result set of data that meets the criteria specified in the joins.

Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement
 
Conello © 2000-2003     Feedback


Mastering Crystal Reports 9
Mastering Crystal Reports 9
ISBN: 0782141730
EAN: 2147483647
Year: 2005
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net