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

May 16, 2005


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.