Canlendar control for string datatype date
Hi, I am trying to get calendar control in my SSRS 2008R2 Report but am not able to do so. I have Date dimension in my cube have Date as datatype "WChar ". I found an article http://dbaspot.com/ms-sqlserver/233382-mdx-dates-calendar-control-reporting-services-2005-a.html which has kindof solution but not worlking for me might be due to my lack of knowledge on ssrs. Anyone help on this will be highly appreciated.Thanks & Regards, Chaitali Thaker
May 12th, 2011 8:31am

HI Chaitali, From Cube: In the main dataset query designer, you have to pick the respected date in the filter selection and give option to Range inclusive and execute the query. Now you are able to see two sub datasets with @FromDate and @ToDate(to see these right click on datasets and check show hidden datasets). Delete these two datasets. Go to list of parameters and right click on @FromDate and go to properties and change the data type to DateTime. Available values to None. You can specify any default value. Repeat the above step to @Todate. Final important step will be, go to your main dataset properties and click on parameters and there you are able to see all the report parameters. Go to @FromDate Parameter value Click on Fx button and write a query like "[Sales Date].[Date].&["+Format(Parameters!FromDate.Value), "MM/dd/yyyy")+"]" Do the same thing to @Todate parameter value. Check the report preview. From SQl Query: In the main dataset query, mention a clause in where condition as Where Date Between@FromDate And @ToDate. Now you are able to see to parameters as @From Date and @ToDate Change their data type to Datetime. No Available values. Specify some default value(not compulsory). Delete their respective datasets. Modify their parameter values similar to "[Sales Date].[Date].&["+Format(Parameters!FromDate.Value), "MM/dd/yyyy")+"]" That's it. Check the report preview. Let me know if you don't understand something. Thanks Tarak
Free Windows Admin Tool Kit Click here and download it now
May 12th, 2011 9:09am

Can you tell me the date attribute format in Cube. Based on that we can change the expression. If the above expression did not work, use the following If date is in this format 2011-01-31 ="[Sales Date].[Date].&["+Format(Year(Parameters!FromDate.Value),"0000")+"-"+Format(Month(Parameters!FromDate.Value),"00")+"-"+Format(Day(Parameters!FromDate.Value),"00")+"]" Let me know if this works or not.
May 12th, 2011 10:17am

Hello Tarak, My cube has format as March 1, 1990 (mm/dd/yyyy). But it is in Wchar Format. I tried doing your steps but it throws Error :- "[BC203025]End of Statement expected" I selected Date as Filter from Cube in my dataset query in SSRS. so i have one one Date i.e From Date. (Just a try) When i tried using your Expression for yyyy/mm/dd it threw error :- object() cannot be convert to date.Thanks & Regards, Chaitali Thaker
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2011 2:14am

Hey Tarak , It worked. It worked for me. Thank You so very much. Thanks a lott :) Your Steps were perfectly right, it was my bad i dint apply opening bracket in your formula. I worked for me thanks a tonn :)Thanks & Regards, Chaitali Thaker
May 13th, 2011 2:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics