Connect the Detail Report to the Primary Report
Having created a primary report and a target detail report, we are ready to interconnect the two. This final set of steps will align the two reports, so that clicking upon a select value within our primary report will pass the appropriate information to the detail report to present drillthrough detail.
1. Re-open the primary report, RS022_MDX_DRILLTHROUGH, if necessary, which we created from a clone of FoodMart Sales sample report earlier.
2. Right click the Store Sales value, just under the Store Sales column heading, which contains the expression "=Sum(Fields!Store_Sales.Value)."
3. Select Properties from the context menu that appears, as shown in Illustration 89.
The Textbox Properties dialog appears.
4. Click the Advanced button at the bottom of the dialog.
The Advanced Textbox Properties dialog appears.
5. Click the Navigation tab.
6. In the Hyperlink Action section of the dialog, click the Jump to report radio button to enable the selector underneath it.
7. Select RS022_DRILLTHROUGH_TARGET report (our "target" detail report) in the selector.
8. Click the Parameters button to the right of the selector.
The Parameters dialog appears.
9. Select pX_ProductName in the Parameter Name selector, top row of the Parameters list.
10. Select the following in the Parameter Value section:
The Parameters dialog appears, with our input, as shown in Illustration 90.
Illustration 90: Parameters Dialog with Our Selections
11. Click OK to accept our selections and close the Parameters dialog.
We return to the Advanced Textbox Properties dialog, which appears as depicted in Illustration 91.
Illustration 91: Advanced Textbox Properties Dialog
12. Click OK to dismiss the Textbox Properties dialogs.
Our alignment of the primary and target reports is now accomplished.
Verification of Operation: Drillthrough from the Primary Report to a Targeted Detail Report
Let's test the drillthrough report pair we have created in the preceding steps, by taking the following actions:
1. Click the Preview tab to execute the primary report, RS022_MDX_DRILLTHROUGH.
The report executes and returns data as partially presented in Illustration 92, where we notice that it has generated 35 pages.
Illustration 92: Primary Report, Indicating 35 Pages (Partial View)
NOTE: Allow the report to finish generating all pages before taking the next step.
2. Click the Store Sales value for American Chicken Hot Dogs (a value of $411 in the report matrix), five lines from the top, in the American Product Brand group.
We see the mouse pointer turn into a "pointing hand" when positioned over the value. The detail report, RS022_DRILLTHROUGH_TARGET is initialized upon clicking the $411, and generates data.
We see the correct Product Name selection, American Chicken Hot Dogs has, indeed been passed to the detail report. Let's verify, too, that the list of detail values appears to be complete, by confirming our total of $411 at the bottom of the drillthrough report.
3. Click the Last Page (>|) button to the right of the page total atop the Preview tab (just under the Product Name parameter box containing American Chicken Hot Dogs), as depicted in Illustration 93.
Illustration 93: Proceed to the Last Page in the Report ...
We arrive at the second (and final) page of the drillthrough report, where we see the total of $410.76 appear for the detail values underlying the total in our primary report. Illustration 94 shows the bottom right hand corner of Page 2 of the report, with this total.
Illustration 94: Corroborating Total from the Bottom of the Last Page ...
We therefore note that the amounts agree, as the value upon which we drilled in the primary report is rounded.
4. Select File --> Save All to save all work to the present.
5. Exit Visual Studio.NET when ready.
We have corroborated the accuracy and completeness of the drillthrough report. We present the results to the Purchasing consumers, noting any remaining cosmetic enhancements that remain, and combining any additional requests with those in our pending list.
In this article, we extended an exploration of the MDX DRILLTHROUGH statement that we began in our MDX Essentials series, Drilling Through with MDX: The DRILLTHROUGH Statement. Our purpose was to explore an approach to providing drillthrough capabilities from a Reporting Services OLAP report in a way that leveraged the DRILLTHROUGH statement in a target detail report, in combination with the Drillthrough Options settings within an Analysis Services cube. To set the stage for our discussion and practice session, we presented a business requirement based upon the needs of a hypothetical client, which we then addressed with a drillthrough capability we assembled in Reporting Services.
We prepared for our practice session by creating a project within Reporting Services, and then creating a "clone" report (based upon an existing sample OLAP report to save time), from which we established a "launch point" for drillthrough actions. We enabled Drillthrough for the sample Sales cube, upon which our client's reports were based, within Analysis Services, and then examined configuration of Drillthrough to present the appropriate transactional details to its intended users;
We briefly discussed the syntax surrounding the DRILLTHROUGH statement, referring to Drilling Through with MDX: The DRILLTHROUGH Statement for an in-depth examination. We next created a "target" report that leveraged DRILLTHROUGH, examining sample results of the data we might expect to be returned in an MDX query with the DRILLTHROUGH statement added.
We next linked the primary report to the new target report. We then verified the operation of our report by executing the drillthrough action in our working example set. Throughout the article, we briefly discussed relevant concepts, as well as the results we obtained within the various actions we took in our practice session.
» See All Articles by Columnist William E. Pearson, III
Discuss this article in the MSSQL Server 2000 Reporting Services Forum.