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

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted May 16, 2005

MSSQL Server Reporting Services : Mastering OLAP Reporting: Ad Hoc TopCount and BottomCount Parameters - Page 9

By William Pearson


Create the Dataset to Support the Hierarchical Date Picklist

We will take our next step from our current position on the Data tab, within the Report Designer. Here we will create the Dataset that will serve as the foundation for the Hierarchical Date picklist.

1.  Select New Dataset, as depicted in Illustration 40.

Click for larger image

Illustration 40: Select New Dataset in the Dataset Selector

The Dataset dialog appears.

2.  Type the following into the Name box.


3.  Type (or cut and paste) the following basic MDX into the Query string box.

   {RS_pX_Time_Hier} ON COLUMNS,

   {[Time].Members} ON ROWS



The Dataset dialog appears as shown in Illustration 41.

Illustration 41: Completed Dataset Dialog

4.  Click OK to accept our input.

The Dataset dialog closes.

5.  Click the Run button on the toolbar to execute the query, as depicted in Illustration 42.

Illustration 42: Click the Run Button to Execute the Query

The new Dataset appears in the Results pane, below the query, as partially shown in Illustration 43.

Illustration 43: Results Dataset Appears (Partial View)

This Dataset will serve as the support for our parameter picklist, (hence its name, ds_pX_Date_Hier) which we will establish next.

Create the Parameter for the Hierarchical Date Picklist

1.  Select Report -> Report Parameters from the main menu atop the design environment, as depicted in Illustration 44.

Illustration 44: Select Report -> Report Parameters ...

The Report Parameters dialog appears.

2.  Click Add.

3.  Type the following into the Name box.


4.  Type the following into the Prompt box.


5.  Ensure that the Allow null value and Allow blank value checkboxes are cleared.

6.  In the Available Values section, click / select the radio button to the left of From query.

7.  In the Dataset selector to the right, select ds_pX_Date_Hier.

8.  In the Value field selector, select Measures_RS_pX_TimeMSASName_Hier.

9.  In the Label field selector, select Measures_RS_pX_TimePLName_Hier.

10.  In the Default Values section, click / select the radio button to the left of None, if necessary.

The Report Parameters dialog appears as shown in Illustration 45.

Illustration 45: Report Parameters Dialog - with Hierarchical Date Parameter Settings

11.  Leave the Report Parameters dialog open for the next section.

We will next create two parameters to allow the ad hoc selection of top or bottom n products.

MS SQL Archives

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