Showing posts with label SQL Server 2008 R2. Show all posts
Showing posts with label SQL Server 2008 R2. Show all posts

Saturday, November 19, 2011

Dynamics CRM 2011 Date Picker Displays US format

This post will only help if you are using the On Premise version - I don't have a solution for the Online version. BTW, I was using SQL Server 2008 R2.

If  you add date parameters to a report that you want to run in Dynamics CRM 2011 then you get prompted to enter the dates. If you set the parameters as type DateTime then a date picker is also displayed.


But when you select a date, the picker puts the date in as US format.  It will still filter the data correctly but I wanted UK format displayed. 

The clue came from this blog.  Now in fact when I ran my report in Report Server (i.e. outside CRM) the date format displays correctly.
So I finally found the solution. You need to add Culture="en-GB" to the reportviewer.aspx page located at C:\Program Files\Microsoft Dynamics CRM\CRMWeb\CRMReports\rsviewer.  Note its the rsviewer directory not the viewer directory. I added it to the end of the first line - the <%@ Page declaration.  

Then the date displayed in UK format in CRM.