This article describes actions to be taken in Report Builder 3.0. Many of us have grown used to having a date picker (calendar) control to select a date in a web form. SSRS reports offer this functionality as well for selecting date values for DateTime parameters. But this convenient control presents problems when the parameter value will be used to filter analysis data.
When you create a report using analysis data and you set date filters in the query designer that will be driven from user input, the report will auto-generate the parameter and supporting query for you. Typically, this is very helpful. However, with dates in particular, the parameter interface is not the familiar date picker but a list of date strings. Since all cube data is in string format, SSRS sets the parameter to data type Text. In fact, while the displayed values in the parameter's list may look like 2012-10-10, the actual value will be something like [Date].[Date].&[2012-10-10T00:00:00].
Let's consider the following scenario: While creating a new report based on the Analysis data (data cube), your dataset requires the user to submit a start and end date to filter the data. As described above, the parameter created is a text parameter, with its allowed values driven from an auto-generated analysis dataset. This does not present an easy user interface and most users will prefer a date picker control. Here's how you fix it:
This alters the functionality from the original auto-generated parameter. As created by SSRS, the allowed values for the date parameter(s) were restricted to known values from the analysis data. For instance, if there were no records for a given date, that date would not be in the list of allowed values for the auto-generated parameters. Converting the parameter to a DateTime parameter removes these restrictions which could allow a user to select an invalid date. You should ensure that your dataset handles this situation gracefully.