To use Cognos product documentation, you must enable JavaScript in your browser.

Set Up Drill-through Access in a Report

Use Report Studio to create a source drill-through report to link two reports containing related information. You can then access related or more detailed information in one report by selecting a value or multiple values in the source report. You can also drill through within the same report by creating bookmarks.

If you are using an SAP BW data source for the target report, and if the target report contains a variable for a hierarchy node, values from the source report can only be values of the data item that represents the leaf-level identifier in the hierarchy.

Before you begin, ensure that you have a report that will serve as the source report and another report that will serve as the target report. The target report must contain one or more parameters that represent the drill-through data items. For more information, see the Report Studio User Guide.

Tip: If you want to use a Report Studio report as a source in a drill-through definition in Cognos Connection, open the report, and from the Data menu, click Drill Behavior, and then select the Allow package based drill-through check box.

Steps
  1. Open the target report.

  2. Create a parameter that will serve as the drill-through column or that will be used to filter the report.

    For example, to drill through or filter Product line, create a parameter that looks like this:

    [Product line]=?prodline_p?

  3. In the Usage box, specify what to do when the target parameter is not fulfilled as part of a drill-through:

  4. To create other parameters, repeat steps 2 to 3.

  5. Open the source report.

  6. Click the element in the report that will serve as the drill-through object.

    You can select a data item that your report users are likely to choose to drill on for more detailed information, such as an Employee Name data item. When defining the drill-through path in Report Studio, you can choose to pass a value from a different data item hidden from the user for display purposes, but still in the query. For example, your users see the Product Name data item and can drill through on that item but the drill-through definition passes the Product Number value for that particular product name that the user has chosen.

    Tip: If you are passing only parameter values to the target report, you do not have to drill on a data item. Instead, you can drill on any object in the report, such as the report title. This means that you can drill from outside the context of a query.

  7. Click the drill-through definitions button  or from the Properties pane, double-click the Drill-Through Definitions property.

  8. Click the new drill-through definition button.

    A drill-through definition is created.

    Tip: To change the drill-through name, click the rename button, type the new name, and click OK.

  9. On the Target report tab, click the ellipsis (...) button next to the Report box, and select the drill-through target report.

  10. Under the Parameters box, click the edit button .

    Each required and optional parameter defined in the target report appears in the Parameters dialog box.

  11. For each parameter, click Method and do one of the following:

  12. Click OK.

  13. In the Action box, decide how the target report will be viewed when users click the drill-through column in the parent report:

  14. If you chose to run the target report in the previous step, in the Format box, click the output format you want for your report.

    Tip: Click (Default) to run the report using the default format specified for the report in Cognos Connection.

  15. If you want the target report to appear in a new window, select the Open in new window check box.

  16. In the Display prompt pages box, decide whether to display prompt pages:

The drill-through object appears as a blue hyperlink in the report. This drill-through action can also be started by clicking the Go To button  . When users run the source report, they can click the object to drill through to the target report. If more than one target report is available, the Go To page appears with the list of available targets.

Tip: If you run the target report directly, you are prompted to select a value for the report to run on.

Specify the Drill-through Text

You can specify the drill-through text that appears when users can drill through to more than one target. For example, if users from different regions view the report, you can show text in a different language for each region.

Steps
  1. Right-click the drill-through object and click Drill-Through Definitions.

  2. If more than one drill-through exists for the object, in the Drill-Through Definitions box, click a drill-through definition.

  3. Click the Label tab.

  4. To link the label to a condition, in the Condition box, do the following:

  5. In the Source type drop-down list, click the source type you want to use.

  6. If the source type is Text, click the ellipsis (...) button beside the Text box and type the text you want.

  7. If the source type is Data Item Value or Data Item Label, click Data Item, and click a data item.

  8. If the source type is Report Expression, click the ellipsis (...) button beside the Report Expression box and define the expression.

  9. If the label is linked to a condition, repeat steps 5 to 8 for the remaining possible values.

  10. Click OK.

When users run the source report and click a drill-through link, the Go to page appears. The drill-through text you specified appears for each target. If you did not specify the drill-through text for a target, the drill-through name is used.

Example - Create a Drill-through Report

You are a report author at The Great Outdoors Company, which sells sporting equipment. You are requested to create a report that lists product sales by order method for each product line, and allows users to drill through from the sales report to view the product details for any item selected. You will create two reports, one that contains the details for the item, and another that lists the product sales for the order methods selected by users.

Steps
  1. In the Cognos Connection Welcome page, click the Launch link, and then click Report Studio.

  2. Select the package GO Data Warehouse (query).

  3. In the Welcome dialog box, click Create a new report or template.

  4. In the New dialog box, click List and click OK.

  5. In the Insertable Objects pane, on the Source tab , add the following data items to the list by double-clicking them:

    Tip: You can find these data items in the Order method and Product folders.

  6. Group the Order method, Product line, and Product type columns.

  7. Click the filters button .

  8. Click the add button, and type the following in the Expression Definition box:

    [Product name]=?p_PN?

  9. Click OK.

  10. Repeat steps 8 to 9 to create the following filter:

    [Order method] in ?p_OM?

  11. Change the title of the report to Product Details.

  12. Save the report as Product Details.

  13. From the File menu, click New to create a new report.

  14. In the New dialog box, click List and click OK.

  15. In the Insertable Objects pane, on the Source tab, add the following data items to the list by double-clicking them:

    Tip: You can find these data items in the Sales fact and Product folders.

  16. Group the Order method, Product line, and Product type columns.

  17. Click the filters button .

  18. Click the add button, and type the following in the Expression Definition box:

    [Order method] in ?p_OM?

  19. Click OK.

  20. Right-click the Product Name column and click Drill-Through Definitions.

  21. Click the new drill through button .

  22. Under Report, click the ellipsis (...) button and select the Product Details report you created previously.

  23. Click Action and click Run the report.

  24. Click Format and click HTML.

  25. Click the edit button .

  26. For the item p_OM, under Method, select Pass parameter value, and select p_OM for the Value.

  27. For the item p_PN, under Method, select Pass data item value, and select Product name for the Value.

  28. Click OK twice.

  29. Change the title of the report to Product Revenue by Order Method.

  30. Save the report as Product Revenue by Order Method.

  31. Click the run report button .

When the report runs, you are prompted to select one or more order methods. When you click OK, the list shows the product names as clickable links. When you click a product name, the second report runs, showing the order method that was selected in the prompt page of the source report and the product (the source report’s column value) selected in the first report.