Create Links Between Datasets

Create links between datasets to combine and structure data after you extract it from the data source.

Joining and structuring data at the source into one combined dataset is sometimes not possible. For example, you can't join data at the source when data resides in disparate sources such as Microsoft SQL Server and an Oracle Database. Even if your data is coming from the same source, if you are creating large reports or documents with potentially hundreds of thousands of rows or pages, structure your data so that it matches the intended layout and optimizes document generation.

Create a link to define a master-detail or parent-child relationship between two datasets. You can create links as element-level links or group-level links. The resulting, hierarchical XML data is the same. Creating links as element-level links is the preferred method. Group-level links are provided for backward compatibility with data templates from earlier versions of Publisher.

A data link or parent-child relationship relates the results of multiple queries. A data link can establish these relationships:

  • Between one query's column and another query's column.

  • Between one query's group and another query's group, useful when you want the child query to know about its parent's data.

About Element-Level Links

Element-level links create a bind (join) between two datasets and define a master-detail (parent-child) relationship between them.

Create element-level links, the preferred method, to define master detail relationships between datasets. When you use element-level links to link datasets, you do not need to code a join between the two datasets through a bind variable.

About Group-Level Links

Group-level links determine how datasets are structured as hierarchical XML, but lack the join information that the data engine needs to execute the master and detail queries.

When you define a group-level link, you must update your query with a link between the two datasets through a unique bind variable.

See Add a Bind Variable to a Query.