Take the 2-minute tour ×

Here is my query:

SELECT [Entry No_], [Currency Code], [Posting Date],
WHERE  [Posting Date] >= (@DateFrom) 
       AND [Posting Date] <= (@DateTo)
GROUP BY [Entry No_], [Currency Code], [Posting Date] 

The [Posting Date] (which gives an error) is a datetime. My report works in Visual Studio, but when deployed on the Reporting Server:


I have tried setting the dateformat like suggested:

set dateformat ymd 

With no success. I've also tried setting Enable Remote Errors to True.

Any ideas on what to try next?

share|improve this question
Are you adding a WHERE clause or a HAVING clause anywhere (if so, please tell us the clause, the parameters, and the parameter types)? Or, are you embedding this query in another query (if so, please tell us the outer query)? Also, what are the data types of the fields your table? Are you holding dates as strings anywhere (if so, are you able to fix this)? –  MatBailie Nov 28 '12 at 14:23
what is the format of the value of [Posting Date]? –  John Woo Nov 28 '12 at 14:23
I added the WHERE condition. The format for [Posting Date] datetime All dates are defined as datetime. Can the Report on RS give problems if the label is a datestring?? –  AceAlfred Nov 28 '12 at 14:38
Note that if you've updated the parameter (e.g. the data type) and redeploy the report, the changes to the parameter are not deployed. See also my answer to another question for some details about that. –  Jeroen Nov 28 '12 at 15:36
What type is the DateFrom and DateTo param? If they are string you are going to run into issues, and as Jeroen said, updates to the report sometimes don't affect the parameters (as far as I know they update correctly if deployed via Visual Studio, but not if deployed via the 'Update Report' link in Report Manager web interface) –  Charleh Nov 28 '12 at 15:37

1 Answer 1

up vote 0 down vote accepted

enter image description here
Found the error. In MS BIDS the parameters "data type" is automatically set to "Text". Changing it to "Date/Time" did the charm.

I think it´s kinda odd that the parameter data type does not automatically change to what the column is set to in the database.

share|improve this answer

Your Answer


