SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Date/Time Filter Question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

paulkem
Starting Member

25 Posts

Posted - 04/11/2013 :  15:26:31  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 04/12/2013 :  05:06:35  Show Profile  Reply with Quote
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

25 Posts

Posted - 04/12/2013 :  07:36:49  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000