Display Calendar to Choose Dates
Hi, I have a report which shows customer details for a month. I have a drop down in the same where I can choose the from date and to date. Is it possible to display a calendar in place of the drop down for from date and to date in the report? Any help would be greatly appreciated Thanks Sharath
May 17th, 2011 6:22am

Hi, You can create datatime parameters in SSRS. Create the parameter and select the type as 'Datetime' and make changes in your report query accordingly. If you need more details, let me know the SSRS version.MSBI Developer
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 6:35am

I'm using SQL Server 2008 R2. Can you give more details on this. Thanks
May 17th, 2011 6:41am

Hi, 1)Open your report in BIDS. 2) Ctrl+Alt+D , to open ReportData pane. 3) Right click on Parameters folder and select 'Add Parameter' 4) Give the names as you want. 4) Select 'Datetime' as data type. The format shown is 'mm/dd/yyyy'. Check if you need any changes in your dataset query. Hope this helps. MSBI Developer
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 6:59am

Hi Sharath, 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
May 17th, 2011 9:19am

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

Other recent topics Other recent topics