Understanding Links
You link tables so that records from one table match related records from another. When you link, you are using a column that is common to both tables. BIRT Analytics uses the link to match up records from one table with those from the other. For example, if you use 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 Customers table that made the order. In this example, the link assures that the data in each row of the report refers to the same order.
In the case of links that have a 1 to 1 relationship, the link column indicated in the “From” field will automatically become the Parent table and the link column indicated in the “To” field will be the Child table. (See Figure 4‑7 below).
Figure 4‑7 Populating FROM and TO fields when creating 1 to 1 links
Links, shown in Figure 4‑8, display final and transient links. Final are the links you create using the Links option or the transformation instruction, LINK. For more information on LINK, see “LINK” in Chapter 5, “Transforming data.” Transient links are automatically generated by the software for performance reasons. For example, the transient link, shown in Figure 4-8 below, gets created if you create a Crosstab with [Customer].[Occupation] as a dimension and Count( Order Detail ) as a measure.
To clear the transient links, choose Remove all transient links.
Figure 4‑8 Managing links
How to create a new link
1 In Link, in From, select the database, table, and column from which the link starts.
2 In Link, in To, choose the database, table, and column to which the link goes, as shown in Figure 4‑9.
Figure 4‑9 Creating links
3 Choose New to create the link. Choose Yes in the message asking you to confirm. The new link appears in the list of links.
How to remove a link
1 In Link, in From, select the database, table, and column from which the link starts.
2 In Link, in To, choose the database, table, and column to which the link goes.
3 Choose Remove to drop the link. Choose Yes in the message asking you to confirm. The link disappears from the list of links.