Linking Fields
It is possible to create master-detail field links between data sources on the Data tab, which can be useful when setting up a report with sub reports.
You can set up a new link between data sources in one of the following ways:
-
Drag the field you want to link from the detail data source to the master data source and drop it on the field you want to link it to.
-
Click the Link button ( ) on the toolbar of the detail data source to open the Link window:
The fields in the destination data source are displayed on the left. Select the master data source that should be linked to this source from the Master dropdown, and the fields in that source appear on the right. Any fields with the same name in both sources are automatically linked and appear in the Linked Fields section below - you can edit the links between the sources in several ways:
- Select a field in the Detail section and a field in the Master section, then click Add to link the two fields. The new link appears in the Linked Fields section.
- Select a link in the Linked Fields section and click Delete to remove that link.
- Click Clear to remove all links between the source.
Links are displayed on the Data tab as lines between tables and the title of the detail data source updates to show that it is linked to the master:
You can double-click on a line to open the Link window and edit the links between the sources.
SQL Tab
The SQL tab of the Link window shows the linking SQL statements that are generated for the data source.
Note: You can hold CTRL and click on a data source's pane on the Data tab to view the linking SQL in a separate window.