MSSQL Server Reporting Services : Mastering OLAP Reporting: Ad Hoc TopCount and BottomCount Parameters - Page 9May 16, 2005 Procedure 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 The Dataset dialog appears. 2. Type the following into the Name box. ds_pX_Date_Hier 3. Type (or cut and paste) the following basic MDX into the Query string box.
SELECT
{RS_pX_Time_Hier} ON COLUMNS,
{[Time].Members} ON ROWS
FROM
[PARAM_SUPPORT_SALES]
The Dataset dialog appears as shown in Illustration 41.
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.
The new Dataset appears in the Results pane, below the query, as partially shown in Illustration 43.
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.
The Report Parameters dialog appears. 2. Click Add. 3. Type the following into the Name box. pX_Date_Hier 4. Type the following into the Prompt box. Period: 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.
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. |