If no relationship is specified in a master-detail report, all detail records are printed for each master record. To create a master-detail report that prints only the detail records associated with this master record, you need to create relationships between data sources. Relations describe relationships between data sources such as "master detail". For example, if in the table of Categories data source for CategoriesID data column there is one record with unique name 1 and in the table of Products data source for data in CategoriesID column there are multiple records with the same unique name 1 there is. The following image shows an example data source table.

As you can see from the image above, the record named 1 in the Categories datasource table corresponds to 12 records in the Products datasource table. In other words, if you create a Relation using the CategoriesID column data between the Categories and Products data tables, the first Master record will correspond to the Detail 12 entries when creating a Master-Detail report. The following image shows an example of a Master-Detail report rendered by the CategoryName and ProductName columns. Here, a column of CategoryID data places a Relation between the Product and Category data sources.

Relation parameters are specified in the New Relation window. To invoke this window, select the New Relation item from the data source's context menu, or click the New Relation button from the Data Settings window on the Relations tab. The image below shows an example of the New Relations window.

As shown in the image above, there are 9 fields that define the relation parameters

The Name in Source field allows you to change the name of the data source (not in the report), for example the original data source in the database.

 The Name field allows you to change the name of the relationship that is displayed to users.

 The Alias field allows you to change the alias of the relation.

 The Parent Data Source field allows you to change the main data source. Selects the data source that is the master entry for the master/detail report.

 A Child data source provides an opportunity to modify the child data source. Selects a data source that is a detail entry in a master/detail report.

 This field shows the column key from the master data source.

 This field shows the column key of the child data source.

 –  Fields display the master data column key and child data column key that establish the relationship between the data sources. Column keys must conform to all rules for creating relations in ADO.NET.

1 must be the same number

2 The types must match, and for a master column key of type string, the child column key must be of type string.

3 etc.;

The data column control panel in the New Relation dialog box has four buttons.

Button to move all data columns from fieldorin the fieldorRespectively;

the selected data column from the field,or fieldAt the inner,orButtons for moving respectively.

the selected data column from the field,or fieldAt the inner,orButtons for moving respectively.

Button to move all data columns from fieldorin the fieldorRespectively.