Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Date/Time Filter Question

Author  Topic 

paulkem
Starting Member

28 Posts

Posted - 2013-04-11 : 15:26:31
When setting up filter parameters on tablix and graphs in BIDS/SSRS 2008, I have noticed that even though the paramater data type is set to Date/Time and the field being filtered is a Date/Time, if I select Date/Time as the data type on the filter configuration screen, it changes to Text the next time I look at it. On one report,Ii was able to get the Date/Time to stick only by removing the filtered query field in the dataset and recreating it. I have no idea why this resolved the issue.

I am using a date picker for the parameter, which is in m/d/yyyy format. The data (which would be fed from a query in SQL server) is in default SQL date format of yyyy-mm-dd

In all of my testing, it appears that the statement is being evaluated correctly, but this really annoys me.

A) Why is it doing this?

B) Is it safe?

Thanks

Paul

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-12 : 05:06:35
whats the actual datatype of field as it comes in dataset which you used for filtering in SSRS? did your select had any explicit CAST/CONVERT over it?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

paulkem
Starting Member

28 Posts

Posted - 2013-04-12 : 07:36:49
Well, the field is a datetime in the table. I do CAST it to a date only in the query (which in this case is a view).

However, it appears to do this on a field in the same dataset that is and always has been a date only field.

I have noticed this behavior on other reports as well so it is not just this report or dataset either. Since I never really paid close attention, and just assumed that if my field was DATE and my parameter was DATE then everything would be fine, I don't know how many other reports that I have created have this same issue, if it even is an issue.

PK
Go to Top of Page
   

- Advertisement -