• I don't know if you have found an answer to this yet but I thought I'd post my solution since I have found that a lot of people (including myself) appear to have problems in this area.

    My requirement was to be able to use a datetime picker to set the value of a parameter that I wanted to include in my MDX script. I am using SSRS and SSAS.

    My initial confusion was all to do with how parameters are defined and used in SSRS. I was always using the Report Parameters dialog accessed via the "Reports/Report Parameters" menuitem in SSRS. This dialog is used to defined parameters that are displayed in the Reporting Services UI (your report). You can, of course, create a parameter here that is not visible by checking the "Hidden" checkbox. When it comes to defining parameters that you want to use within your MDX query, though, this is not the place to go. There are two other places where you configure MDX parameters. The first is in the "Query Parameters" dailog. I think of this dialog as a place where you declare your parameters. This dialog is accessed via the "Query Parameters" toolbor button (the one with the "@" symbol on it) in the "Data" pane of your report. Using this dialog, you declare the parameter that you want available to your MDX script. The next area (see below) will be how you define the value of this parameter.

    The next area for configuring parameters is accessed by clicking the "..." button next to the dataseet list in the "Data" pane of your report.This will dislay a "Dataset" dialog box. Click the "Parameters" tab. You will have to enter the name of the parameter you declared in the step above (it is not available in any pulldown list, go figure). In the "Value" field next to the name you just entered, you can enter an expression to set the value of the parameter. Remember, this parameter you are configuring is the one you want to use in the MDX script. It will be getting its value from a UI parameter; the datetime picker that you configure in the "Reports/Report Parameters" menuitem.

    The expression I used was:

    ="[Start Hour].[Day].&["&Trim(Str(Day(Parameters!EndDay.Value)))&"]"

    This constructs a member string that matches the hierarchy defined in my underlying OLAP cube.