### Linking tables

You link tables so records from one table will match related records from another. For example, if you activate an Orders table and a Customers table, you link the tables so that each order (from the Orders table) can be matched up with the customer (from the Customer table) that made the order.

When you link, you are using a field that is common to both tables. Seagate Crystal Reports uses the link to match up records from one table with those from the other. In this example, the link assures that the data in each row of the report refers to the same order.

#### Link from and link to

When you link two tables, you link from one table to another table. The from table is used as a primary table, while the to table acts as a lookup table where records are looked up by the primary table. In a simple link, the Report Designer examines the first record in the primary table and finds all matching records in the lookup table. Once all matches have been found in the lookup table for the first record in the primary table, all matches in the lookup table for the next record in the primary table are found.

Note: Seagate Crystal Reports can link two records based on a partial match of string data. This is called a partial link. To enable partial linking in Seagate Crystal Reports, select the Allow partial text matches check box on the Link Options dialog box. As an example of a partial link, a record with a field value of "Chris" can link to a record with a field value of "Christopher." However, partial linking works only when the value in the lookup table is longer than the value in the primary table. In other words, the value "Chris" can link to the value "Christopher," but the value "Christopher" cannot link to the value "Chris."

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com