Anda di halaman 1dari 4

Master Detail is used to deliver information that would otherwise required two or more Reports.

For example, you can combine a list with a chart. 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

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. 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.

Master Detail or Burst Reports with Charts or Crosstabs May Result in Denial of Service
When running a master detail or burst report that includes a chart or crosstab, disk space exhaustion may cause the report or other requests to fail. A large set of burst keys or master rows may produce one or more charts per detail, resulting in many master detail executions. This may cause the temp folder to accumulate many gigabytes of temporary files containing data required for successful chart rendering. To avoid this issue, we recommend that you test large master detail or burst reports that include charts or crosstabs to determine the potential peak disk requirements for the report.

How do you create a Master Detail Relationship in Cognos 8

Associate the master query to a Page break so that the two Queries are not at the same level. Query 1 is associated to the Page Break, Query 2 is associated to the List. Steps: These steps describe how to have two lists on a single page, and have a Master Detail relationship between them. 1. Open Report Studio and insert two lists on one page. 2. Add the required columns to both lists. 3. In the master list, group the column that is to be used as the link in the master detail relationship. 4. Insert a filter into the master list so that you only see the records that you want to see in the child list. 5. From the View menu, select 'Report Pages' 6. Click anywhere on Page1 to enable the 'Properties' pane on the bottom left of the screen. 7. In the Properties pane, under 'Data\Query' link the master query to the page. 8. Double-click anywhere on Page1 to return to the report layout screen. 9. Click anywhere on the detail query. From the 'Data' menu, click 'Master Detail Relationships'. 10. Create a 'New Link' to establish the appropriate relationship between the two queries. 11. Click 'OK'

Steps: 1. Insert two lists on one page 2. Add the columns to both lists 3. Group the column in the master list that is to be used as the link in the Master Detail relationship. 4. Insert the filter into the master list so that we only see the records that we want to see in the child list. 5. File menu -> Pages. 6. Create a page break and select the master query from the drop down menu 7. Select the Page breaks by Grouping Level radio button and select the column grouped on.

8. Click OK twice. 9. From the Data menu, select Master / Detail Relationship. 10. Click New, and select Filtered Detail Query for this example. 11. Select the second query. 12. Click OK and enter the expression that will link the two queries together (ex: MasterQuery.field1 = DetailQuery.field1). 13. Run the report

A master-detail query is an outer join. It is useful when you want to include ALL records in the master query regardless of whether there are matching records in the detail query or not. (These instructions are based on CRN V7 MR3.) 1. On a blank report page, drag in a new list item (called MasterQuery in this example). Populate it as needed. 2. Drag in a new list item (called DetailQuery in this example) and drop it into one of the columns of the MasterQuery list. Populate this list as needed. One of these fields (called ID in this example) must be related to an associated field in the MasterQuery list to link the two queries. This step must be done correctly to allow DetailQuery to be an available selection in Step 5 below. 3. On the Menu Bar, select Data > Master/Detail Relationships... 4. Select MasterQuery in the top listbox. 5. Add DetailQuery as a filtered query and set MasterQuery.ID=DetailQuery.ID. If DetailQuery is not shown as an available detail query selection, then double-check that you performed Step 1 correctly. 6. Run your report. Some further notes: You can add multiple detail queries to a single master query. You can enhance the appearance of the report by hiding the detail query list headers as desired.

Master - Detail Relationship


A master-detail query is an outer join. It is useful when you want to include ALL records in the master query regardless of whether there are matching records in the detail query or not. 1. On a blank report page, drag in a new list item (Master). Populate it as needed. 2. Drag in a new list item (Detail) and drop it into one of the columns of the Master list. Populate this list as needed. One of these fields (ID) must be related to an associated field in the Master list to link the two queries. This step must be done correctly to allow Detail to be an available selection in Step 5 below.

3. On the Menu Bar, select Data > Master/Detail Relationships 4. Select Master in the top listbox. 5. Add Detail as a filtered query and set Master.ID=Detail.ID. If Detail is not shown as an available detail query selection, then double-check that you performed Step 1 correctly. 6. Run your report. Some further notes: You can add multiple detail queries to a single master query. You can enhance the appearance of the report by hiding the detail query list headers as desired.

Anda mungkin juga menyukai