0
votes

In which format I should pass date field to parameter to be able to choose date picker insted of list?

My query returns date (date format) and I cast it in a different ways (yyyy-dd-MM, yyyy-MM-dd, dd-MM-yyyy, ...) in SSRS:

=Format(Fields!StartDate2.Value,"yyyy-dd-MM")

I use this field in parameter, but I always get error:

An error has occurred during report processing. (rsProcessingAborted) The property ‘ValidValues’ of report parameter ‘STARTDATE’ doesn't have the expected type. (rsParameterPropertyTypeMismatch)

When I just passing result of query (date format), I have list:

enter image description here

even If chose Date/Time:

enter image description here

1

1 Answers

2
votes

Answer

The reason you are getting this problem is because the Language/Culture/Date Format on your environments are not similar.

SQL by DEFAULT uses en-US and your local pc uses your local Language/Culture/Date Format.

there is your problem, instead of converting the value of your dates to your local Language/Culture/Date Format, convert it to en-US "MM-dd-yyyy"

Answer explained

to put this in perspective you are sending a SQL server with the date format "MM/dd/yyyy" the value "2017/16/03".

so the server thinks "this guy is telling me to search for the 2017th month, 16th day of the year 03"