Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Sep 18, 2006

BlackBelt Authoring: Conditional Drillthrough to Multiple Reports - Page 3

By William Pearson

Create Basic "Launch" and "Target" Reports for the Practice Exercise

Create a Basic Launch Report from Scratch

Let’s create a basic OLAP report - a "launch" report that contains data upon which we will base conditional drillthrough - to fit the hypothetical business requirement we have outlined. We won’t spend a great deal of time with formatting and other nuances of presentation – the point here is to illustrate a conceptual option for conditional drillthrough.

1.  In Solution Explorer, right-click the Reports folder, within the AdventureWorks Sample Reports project that we have opened.

2.  Select Add from the context menu that appears.

3.  Select New Item ... from the context menu that cascades from the first, as shown in Illustration 10.


Illustration 10: Select Add -> New Item ...

The Add New Item dialog appears.

4.  Click Report in the Templates pane, as required, to select it.

5.  Type the following into the Name box at the foot of the dialog:

RS033_LAUNCH_Country_Cust Base

6.  Click the Add button in the bottom right corner of the dialog, which should appear as depicted in Illustration 11.


Illustration 11: Creating a New, Blank Report

RS033_LAUNCH_Country_Cust Base.rdl, currently a blank canvas, opens within the design environment, and appears in the Solution Explorer, as shown in Illustration 12.


Illustration 12: The New Report Appears within Solution Explorer

Let’s create a basic Dataset, upon which to base our new OLAP report.

7.  Click the Data tab within Report Designer, to open the Data view, if it is not already open.

8.  Using the "down arrow" button to the right of the Dataset selector, atop the Data tab, click <New Dataset...>, as depicted in Illustration 13.


Illustration 13: Adding a New Dataset ...

The Dataset dialog appears, defaulted to the Query tab.

9.  Type the following into the Name box atop the tab:

RS033_LAUNCH_Data

10.  Select AdventureWorksAS (shared) in the Data source box just below the Name box on the tab.

The Query tab of the Dataset dialog appears as shown in Illustration 14.


Illustration 14: The Dataset Dialog for Our New Dataset

11.  Click OK to accept the new Dataset definition, and to dismiss the Dataset dialog.

The MDX Query Designer opens in Design view.

12.  Within the Metadata pane, to the left of the design area, expand the Sales Territory dimension by clicking the "+" sign to its immediate left.

13.  Expand the Sales Territory hierarchy that appears underneath the dimension (bottom item within the dimension).

The Sales Territory hierarchy expands, exposing its members within the Metadata tree, as depicted in Illustration 15.


Illustration 15: The Expanded Sales Territory Dimension and Hierarchy ...

14.  Drag the newly exposed Sales Territory Group into the Results pane of the Dataset design area, as shown in Illustration 16.


Illustration 16: Adding Sales Territory Group to the Dataset ...

Sales Territory Group appears as a column heading in the design area. Let’s add additional data fields that we will need in our query.

15.  Within the Metadata pane, once again, expand the Date dimension.

16.  Expand the Fiscal folder that appears within the Date dimension.

17.  Expand the Fiscal hierarchy that appears within the Fiscal folder (bottom item within the folder).

18.  Drag the newly exposed Fiscal Year into the Results pane area, dropping it to the right of the Sales Territory Group column, as depicted in Illustration 17.


Illustration 17: Adding Fiscal Year to the Dataset ...

Fiscal Year now appears as a second column heading in the Results pane area. Let’s add the measure we need to meet the expressed business requirements.

19.  Within the Metadata pane, expand Measures.

20.  Expand the Internet Sales folder that appears within Measures.

21.  Drag the Growth in Customer Base measure (actually a calculation), into the Results pane area, dropping it to the right of the columns already in place, as shown in Illustration 18.


Illustration 18: Adding The Measures ...

22.  In the Filter pane, located in the upper right corner of the Query Designer, select Date via the Dimension column selector button.

23.  Select Date.Fiscal Year in the Hierarchy column, to the immediate right of the Dimension column, within the Filter pane.

24.  Select Equal in the Operator column.

25.  Leave the selector for the Filter Expression column in its default condition of empty.

26.  Place a check (by clicking) in the checkbox within the Parameters column.

The Query Designer appears, with our Filter settings at top, as depicted in Illustration 19.


Illustration 19: The Query Designer with our Filter Settings

NOTE: If the Results pane has not populated, as shown in the illustration above, click the Execute Query ("!") button in the toolbar atop the Query Designer, shown circled in Illustration 20.


Illustration 20: The Execute Query Button in the Toolbar

We now have the data we need to support our simple report set requirements. Next, we will add a matrix data region, along with data, to the report canvas on the Layout tab.



MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date