April 21, 2009 at 2:08 pm
I have a report that has a date parameter. When the user runs the report in SSRS, I want them to be able to pick dates from a calendar control rather than the default drop down. I have modified the datatype of the date in SSRS to datetime. The parameter name in SSRS is ShippeddateShipDate. I have set the available values to non queried and the default value is null. I have modified the main reports' parameter values as follows: ="[Shipped Date].[Ship Date].&[" + Format(CDate(Parameters!ShippedDateShipDate.Value),"s")
When I run the report I do not get a calendar but am able to type in a date. Once I do, such as 2009-02-11 I get an error stating 'The value expression for the query parameter 'ShippedDateShipDate' contains an error: Conversion from type 'Object()' to type date is not valid. Has anyone done this?
April 21, 2009 at 2:40 pm
You can setup the date/time parameter and put a default value of something along the lines of: =CDate(Now().AddDays(-1).ToShortDateString())
Then you can setup the command text for your query with the logic that you are trying to using referencing the Parameter value and concatenate that in so that you are generating your MDX statement based on the date/time value selected by your user.
----------------------------------------------------------------------------------------
Dan English - http://denglishbi.wordpress.com
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply