I am not a Reporting Services pro - so there may be an easier way of doing this. Anyway:
I believe you are using a query parameter. The date control will appear when you have a report parameter.
Report Parameters: Accessed from the Data or Layout tab. Click the Report -> Report Parameters. On the Report Parameters dialog add a new Parameters by clicking "Add" Set its Data Type: to DateTime Save Go to Preview - you should see the date control at the top of the page.
Query parameters From the Data tab click the button that looks like a report with an @ symbol over it (next to refresh). These are used in the queries.
So the next question is "So how do I get my Report Parameter into a report?"
The Date Report Parameter will return a datetime - in the query you would like a string like [Date].[...].[<Some Date>]. One way to do this is to create a second Report Parameter where you will do the conversion (you could convert it elsewhere if that is more convenient). The steps from to convert in a second Report Parameter are:
Create a DateTime Report Parameter is called DateReportParam. From the Layout tab click Report -> Report Parameters Add the DateReportParam of type DateTime. Set default value to, say, =Today()
Create a second Report Parameter called DateReportParamStr. On the Report Parameters dialog add this new param. Data Type: String Internal checked Default Value: Non-queried, Value: ="[Date].[Date].&[" + CDate(Parameters!DateReportParam.Value).ToString("s") + "]"
Now in the query where you want to include the parameter create a Query Parameter On the Data tab select the Dataset you would like to include the parameter in Click the button that looks like a report with an @ sign over it (between refresh and delete directly above the query) Add a Parameter called DateQueryParam Dimension: Date Hierarchy: Date.Date Default: <Select any value> (this doesn't matter - it is used when executing the query in the editor) OK
Map the Query parameter to the Report parameter On the Data tab click the "..." button directly next to the dropdown containing the Datasets. On the Parameters tab Find the parameter Named: DateQueryParam For its Value select =Parameters!DateReportParamStr.Value
Now you should be able to use the parameter in your query as @DateQueryParam and its value will come from the Date control (called DateReportParam).
|