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.
Open the target report.
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?
In the Usage box, specify what to do when the target parameter is not fulfilled as part of a drill-through:
To specify that users must click a value in the source report, click Required.
If the parameter is not fulfilled and it is required, users are prompted to choose a value.
Note: Drill-through definitions that have been authored inside a Report Studio report appear to the consumer as a blue hyperlink. Clicking the hyperlink is how they drill through to the target report and select the value they want passed to the target.
A consumer can choose to select multiple items within a single column and when the drill-through target report is run, the values from each row selected will be passed to the target parameters. This occurs as an and condition.
To specify that users do not need to click a value in the source report, click Optional.
Users are not prompted to choose a value if the parameter is not fulfilled. The value will be unfiltered.
To specify not to use the parameter, click Disabled.
The parameter is not used during the drill-through.
To create other parameters, repeat steps 2 to 3.
Open the source report.
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.
Click the drill-through definitions button or from the Properties pane,
double-click the Drill-Through Definitions property.
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.
On the Target report tab, click the ellipsis (...) button next to the Report box, and select the drill-through target report.
Under the Parameters box, click the
edit button .
Each required and optional parameter defined in the target report appears in the Parameters dialog box.
For each parameter, click Method and do one of the following:
To specify not to pass any value, click (Default).
That is, the default method is to not pass any value.
To specify not to use this parameter, click Do not use parameter.
The target report is not be filtered by this parameter.
To pass values from a data item, click Pass data item value, click Value, and then click the data item that you want.
Values for the selected data item are passed to the target report.
To pass values from a source report parameter, click Pass parameter value, click Value, and then click the parameter that you want.
Values for the selected parameter are passed to the target report.
Click OK.
In the Action box, decide how the target report will be viewed when users click the drill-through column in the parent report:
To run the target report, click Run the report.
Run the target report when you want to see the latest data.
To view the most recently saved output version of the target report, click View the most recent report.
Saved output versions are created in Cognos Connection.
To use the default action specified for the report in Cognos Connection, click (Default).
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.
If you want the target report to appear in a new window, select the Open in new window check box.
In the Display prompt pages box, decide whether to display prompt pages:
To always display prompt pages when the drill-through action occurs, regardless of whether values were specified for the required parameter values, click Always.
To use the prompt settings of the target report (specified by the Prompt for Values checkbox in Cognos Connection - Report Properties - Report tab) to determine whether to show the prompt pages, click Based on the default prompt settings of the target report.
To not display prompt pages when the required parameter values are provided by the drill-through definition, click Only when required parameter values are missing. This is the default.
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.
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.
Right-click the drill-through object and click Drill-Through Definitions.
If more than one drill-through exists for the object, in the Drill-Through Definitions box, click a drill-through definition.
Click the Label tab.
To link the label to a condition, in the Condition box, do the following:
Click Variable, and click an existing variable or create a new one.
Click Values, and click one of the variable’s possible values.
In the Source type drop-down list, click the source type you want to use.
If the source type is Text, click the ellipsis (...) button beside the Text box and type the text you want.
If the source type is Data Item Value or Data Item Label, click Data Item, and click a data item.
If the source type is Report Expression, click the ellipsis (...) button beside the Report Expression box and define the expression.
If the label is linked to a condition, repeat steps 5 to 8 for the remaining possible values.
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.
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.
In the Cognos Connection Welcome page, click the Launch link, and then click Report Studio.
Select the package GO Data Warehouse (query).
In the Welcome dialog box, click Create a new report or template.
In the New dialog box, click List and click OK.
In the Insertable Objects pane, on
the Source tab ,
add the following data items to the list by double-clicking them:
Order method
Tip: You can find these data items in the Order method and Product folders.
Group the Order method, Product line, and Product type columns.
Click the filters button .
Click the add button, and type the following in the Expression Definition box:
[Product name]=?p_PN?
Click OK.
Repeat steps 8 to 9 to create the following filter:
[Order method] in ?p_OM?
Change the title of the report to Product Details.
Save the report as Product Details.
From the File menu, click New to create a new report.
In the New dialog box, click List and click OK.
In the Insertable Objects pane, on the Source tab, add the following data items to the list by double-clicking them:
Order method
Tip: You can find these data items in the Sales fact and Product folders.
Group the Order method, Product line, and Product type columns.
Click the filters button .
Click the add button, and type the following in the Expression Definition box:
[Order method] in ?p_OM?
Click OK.
Right-click the Product Name column and click Drill-Through Definitions.
Click the new drill through button .
Under Report, click the ellipsis (...) button and select the Product Details report you created previously.
Click Action and click Run the report.
Click Format and click HTML.
Click the edit button .
For the item p_OM, under Method, select Pass parameter value, and select p_OM for the Value.
For the item p_PN, under Method, select Pass data item value, and select Product name for the Value.
Click OK twice.
Change the title of the report to Product Revenue by Order Method.
Save the report as Product Revenue by Order Method.
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.