Note:
The Link screen only displays if two or more tables (.csv files) were added to the Selected Tables list. In this example only one table was added to the Selected Tables list so the Links screen would not have displayed. The demonstration below is included in order to show how to use the Link screen but the changes made here will have no bearing on the remainder of this example.
The Links screen is used to configure the links that join the tables (the .csv files) included in the report. Tables are linked by common key fields, in this example, ecatalogue_key:

This is not the place to describe in detail how Crystal Reports manages links between tables, but a quick overview may suffice.
Although Crystal understands that the tables are linked together, it does not always link them in the most useful way. Generally it makes sense to think of the direction of a link as being from the primary table - notionally the table on the left hand side - to a lookup table. In the example above, Crystal has not identified ecatalogue_csv as the primary table and, as we'll see, it has applied a default Join / Link type of Inner Join, which is not particularly useful.
If we click Link Options, we find that there are four possible Join types in Crystal Reports.
Note:
The Link Options button will be greyed out and inaccessible until a link between two tables is selected (click the link to select it - it will turn blue).

The four Join types are:
- Inner Join
- Left Outer Join
- Right Outer Join
- Full Outer Join
Each Join type specifies different conditions for determining which records will display in a report. As an example, consider this Inner Join scenario: Table A is the primary table, with links to records in Table B (the direction of the link is Left to Right / Table A to Table B). If the Join type is Inner Join, only records in Table A that have a link to a record in Table B will be listed in the report. If a record in Table A does not link to a record in Table B, it will not be displayed in the report.
Note:
The default Join type in Crystal Reports is Inner Join: this may not display all the records on which you wish to report.
In this example, for all Table A records to be listed in the report whether or not they are linked to a record in Table B, it is necessary to select the Left Outer Join option.
Important: If records in Table A link to two or more records in Table B (in other words, the field stored in Table B is a table of values, such as Other Names: (Person Details) in the Parties module), it is more appropriate to create a subreport to add records in Table B. Using the method described below, if a record in Table A links to three records in Table B, the Table A record will be listed three times in the report.
For example, Table A records the last name of a Party (Smith). Table B records the Party's Other Names (Smithy, Smit); if we link the tables as described below, two records would be listed in the report containing: 1. Smith Smithy 2. Smith Smit. If you create a subreport for Table B and link that to Table A, our Table A record will be listed once only, but will include both Table B values. See How to add a subreport for details.
To correct the direction of Joins and to specify an appropriate Join type:
- Click Clear Links.
A dialogue box displays:

- Click Yes to continue.
The links are removed from between the various tables.
- Position the primary table on the left.
- In the primary table, select the key field ecatalogue_key in this example) and drag it over the equivalent field in each lookup table:

Note: Lookup tables may themselves link to other Lookup tables using another key field and it will be necessary to specify these links too.
- Select the link between two tables (it will turn blue).
- Click Link Options to display the Link Options box.
- Select a Join Type radio button:

Note: If in doubt, use the Left Outer Join option: "The result set from a Left Outer join includes all the records in which the linked field value in both tables is an exact match. It also includes a row for every record in the primary (left) table for which the linked field value has no match in the lookup table."
- Click OK.
If required, repeat for all links between tables.

Note: Note that the links now indicate the direction of the Join (Left to Right).
- Click OK to close the Database Expert.
Next we design and format the report in Crystal Reports Designer.
[Close]