Create a Master Detail Relationship

Create a master detail relationship to deliver information that would otherwise require two or more reports. For example, you can combine a list with a chart. The list can contain product lines and the chart can show details for each product line.

Master detail relationships must appear in nested frames to produce the correct results. You can create a master detail relationship in two ways:

  • Use a parent frame for the master query and a nested frame for the detail query.
  • Associate a report page with the master query and use a data container, such as a list or crosstab, for the detail query.

You cannot display parent data in the child frame or child data in the parent frame. Also, you cannot perform calculations across master detail queries.

You can use a master detail relationship to show data from separate data sources in a single report. However, the data sources must be contained in the same package.

With the dynamic query mode, master detail reports with a crosstab report object are optimized to use a single query whenever possible, rather than a separate query for each report object instance.

Procedure

  1. To use a parent frame for the master query and a nested frame for the detail query:
    • Click the Toolbox icon The toolbox icon and drag a List, Repeater Table, or Repeater to the report.
    • Add a second data container to the object you inserted.

      You can insert a list, crosstab, chart, repeater table, or repeater into a list. You can add a list to a repeater table or repeater.

    • Add data items to both data containers.
  2. To associate a report page with the master query and use a data container for the detail query:
    • Click anywhere in the report page.
    • Click the Show properties icon Show properties icon, and In the Properties pane, click the Select ancestor icon select ancestor icon and click Page.
    • Set the Query property.
    • Click the Toolbox icon and drag a data container to the report.
  3. To link a data item in the master query to a parameter in the detail query instead of to another data item, create the parameter in the detail query.

    Use parameters to filter values at a lower level in the detail query.

    • Click the Queries icon Queries icon, and double-click the detail query.
    • Click the Toolbox icon and drag the Filter object to the Detail Filters box.
    • In the Expression Definition box, create the parameter.
  4. In the navigation menu, click Report, and then under Pages click the report page.
  5. Click the data container containing the details.
  6. In the on-demand toolbar, click the Select ancestor icon and click Page.
  7. Click New Link.
  8. In the Master box, click the data item that will provide the primary information.
  9. To link the master query to a data item, in the Detail box, click the data item that will provide the detailed information.
  10. To link the master query to a parameter, in the Parameters box, click the parameter that will provide the detailed information.
    Tip: To delete a link, select the link and press the Delete key.
  11. If your detail query object is a chart, you can disconnect a chart title from the master query.
    • Click the chart title, and in the report object toolbar, click the More icon and click Master Detail Relationships.
    • Clear the Use the master detail relationships from the chart check box.
  12. If your master detail relationship includes a chart as the detail and you are using automatic axis ranges, you can set the same axis range for all the detail charts:
    • Select the axis.
    • In the Properties pane, under General, double-click the Axis range property.
    • Under Maximum and Minimum, click Automatic.

      The master detail report option is only available with automatic axis ranges.

    • Under Master detail reports, select the Same range for all instances of chart check box.

    For more information about axis ranges, see Change the axis scale of a chart.

    Tip: To avoid seeing the same data item twice in the report, click the data item in the data container driven by the detail query, click the More icon and click Cut. This removes the item from the report display but keeps it in the query.