Report Studio

Creating 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:

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.

To create a master detail relationship using queries that reference two different dimensional data sources, you must first link the members by aliasing the levels that contain the members.

 

To create a master detail relationship:

  1. To use a parent frame for the master query and a nested frame for the detail query:
  2. From the Toolbox tab , drag a List, Repeater Table or Repeater to the report.
  3. 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.
  4. Add data items to both data containers.
  5. To associate a report page with the master query and use a data container for the detail query:
  6. Click anywhere in the report page.
  7. In the Properties pane, click the select ancestor button and click Page.
  8. Set the Query property.
  9. From the Toolbox tab, drag a data container to the report.
  10. 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.
  11. Pause the pointer over the query explorer button and click the detail query.
  12. From the Toolbox tab, drag the Filter object to the Detail Filters box.
  13. In the Expression Definition box, create the parameter.
  14. Pause the pointer over the page explorer button and click the report page.
  15. Click anywhere in the report page.
  16. In the Properties pane, click the select ancestor button and click Page.
  17. Click the data container containing the details.
  18. From the Data menu, click Master Detail Relationships.
  19. Click New Link.
  20. In the Master box, click the data item that will provide the primary information.
  21. To link the master query to a data item, in the Detail box, click the data item that will provide the detailed information.
  22. To link the master query to a parameter, in the Parameters box, click the parameter that will provide the detailed information.
    Note: To delete a link, select the link and press the Delete key.
  23. If your detail query object is a chart, you can disconnect a chart title from the master query.
  24. Click the chart title, then from the Data menu, click Master Detail Relationships.
  25. Clear the Use the master detail relationships from the chart check box.
  26. 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:
  27. Select the axis.
  28. In the Properties pane, under General, double-click the Axis Range property.
  29. Under Maximum and Minimum, click Automatic.
    The master detail report option is only available with automatic axis ranges.
  30. Under Master detail reports, select the Same range for all instances of chart check box.

    Note: To avoid seeing the same data item twice in the report, click the data item in the data container driven by the detail query and click the cut button. This removes the item from the report display but keeps it in the query.

 

Related Topics: