|
You're probably beginning to realize that the most challenging part of report development isn't the creation process but the correct linking of database objects. Not only do you need to link matching fields correctly, but you must also account for the relationship between the pair of tables (not every pair of database objects utilizes a one-to-one relationship). Hopefully your database documentation will steer you in the right direction regarding the relationships between your database objects.
If you should find that your database utilizes relationships other than one-to-one, you'll probably need to do a little tweaking of your links. You can find this ability with the Link Options button, available within the Database Expert.
To access the Link Options dialog box, perform the following steps:
Select a link between two tables.
For example, select the link that joins the two Supplier ID fields. Notice that the Link Options button becomes active.
Press the Link Options button.
The Link Options dialog box displays, as shown in Figure 6-6.
Figure 6-6: The Link Options dialog box
There are three areas of functionality associated with the Links Options dialog. These three areas are as follows:
From and To Table: This section describes the linking fields used within the two tables. The source table is listed to the left of the arrow, and the target table is listed to the right of the arrow.
Join Type: This section provides options that allow you to define the relationship between two tables (by default, Inner Join is selected). Refer to Table 6-6 for more information regarding these join types.
Link Type: Link types are similar to parameters (discussed in Chapter 11). Link types allow you to filter the records that are returned within your report. Table 6-7 summarizes the available link types:
Link Type | Abbreviation | Description |
---|---|---|
Equal | = | Links all the records that are an exact match. |
Greater Than | > | Links all records in which the value from the source table is greater than the value from the target table. |
Greater Than or Equal | >= | Links all records in which the value from the source table is greater than or equal to the value from the target table. |
Less Than | < | Links all records in which the value from the source table is less than the value from the target table. |
Less Than or Equal | <= | Links all records in which the value from the source table is less than or equal to the value from the target table. |
Not Equal | != | Links all records in which the value from the source table is not equal to field values within the target table. |
Tip | The linking types are a way of creating an overall filter for your report records (in other words, defining even before the report generates what records should and should not display). Creating parameter fields (which you'll learn about in Chapter 11) is a more flexible way to perform the same type of functionality. A good rule of thumb is that if you wish to filter the records that display within your reports, use parameter fields rather than link types. |
Don't worry about tweaking your links — you'll find that the majority of databases that you use for your reporting purposes utilize inner joins. Thus, all you need to worry about is making sure that you're linking the correct fields from one database table to another. Crystal Reports will do the rest.
To get out of the Link Options dialog box, press the Cancel button. You're returned to the Database Expert.
|