Hit a snag today trying to set the format on date parameters that drive SSRS 2012 reports – at first I thought it would be simple to fix but after searching around for solutions, didn’t come up with much.
The specific problem I was/am having is that when you use Date/Time parameters to drive a report built in SSRS 2012 the date formats always revert to US format after choosing a date from the calendar control – making your date selections incorrect, or sometimes invalid, depending on the dates you have chosen. I don’t know if this problem exists when using the native viewer, but certainly many people have reported it in SharePoint integrated mode.
Changing the Language property of the report, the regional settings of the client or the regional settings of the server all make no difference (though I suspect that they also have to be set correctly).
The only solution that I found is to hard code the UICulture value into RSViewerPage.aspx, which on my system was found in:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ReportServer
The modified code looks like this:
<%@ Page language=”C#” Codebehind=”RSViewerPage.aspx.cs” AutoEventWireup=”false” Inherits=”Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91″ UICulture=”en-GB” %>
Changing the UICulture worked for me, but introduced a problem of its own – I lost the formatting of the sidebar on report viewer, after a little digging I found out why. As you may not be using “en-GB” you can also use the method to adapt it to your region.
The reason that formatting vanished is because I set my UICulture to en-GB which according to this page:
Has a locale ID of 2057, previously the page source all referred to 1033 which is “English (United States)”. Having changed the UICulture it is now looking for folder “2057, which does not exist. There is a Styles subfolder which contains styles for each locale, on my system the full path to this was:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ReportServer\styles
There are lots of entries in that folder for many different locales, but not one for 2057 (Presumably because it is the same as en-US for the most part).
I simply copied the contents of 1033 to a new folder called 2057 and the formatting came back.
Pretty simple to fix when you have dug through the system and found all the relevant files, but not easy to discover. I’m not really happy with this fix and would be very pleased to hear of any better, more official ways of fixing the problem. Surely there are lots of people in other regions not using the US date formats for their Sharepoint Integrated reports. I’m not fond of manually tweaking the report viewer code.
Davinder Singh says
I’ve encountered the same problem.
I have updated my SQL Server to SP1 2012 and still nothing. The Report Parameters are still showing US Date format mm/dd/yyyy. http://support.microsoft.com/kb/2764343
I have also just found the Cu 5 Update which is supposed to fix this issue.
SP1 for SQL2012 takes the SQL Server Installation version to 11.0.3000 – the CU update is 11.0.2xxx
Everything tells me I shouldn’t even attempt this CU update. But I’m running out of options.
I may try your version of this fix if this really http://support.microsoft.com/kb/2764343 update does not work. I’m going to try it anyway… wish me luck!
Dee.
Davinder Singh says
Tried your method, but I get an error stating that the code isnt compiled for RSReportViewer.aspx
Davinder Singh says
This is what my RSReportViewer.aspx page tag looks like:
Everytime I add the code UICulture=”en-GB” – it just seems to break!
Davinder Singh says
%@ Page language=”C#” Codebehind=”RSViewerPage.aspx.cs” AutoEventWireup=”false” Inherits=”Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91″ %
Davinder Singh says
I’ve encountered the same problem.
I have updated my SQL Server to SP1 2012 and still nothing. The Report Parameters are still showing US Date format mm/dd/yyyy. http://support.microsoft.com/kb/2764343
I have also just found the Cu 5 Update which is supposed to fix this issue.
SP1 for SQL2012 takes the SQL Server Installation version to 11.0.3000 – the CU update is 11.0.2xxx
Everything tells me I shouldn’t even attempt this CU update. But I’m running out of options.
I may try your version of this fix if this really http://support.microsoft.com/kb/2764343 update does not work. I’m going to try it anyway… wish me luck!
Dee.
Paulie says
I can see the code I posted above does not display on the page, so quite useless, this is how my version looks:
<%@ Page language="C#" Codebehind="RSViewerPage.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" UICulture="en-GB" %>
Davinder Singh says
Many Thanks Paulie. Got it to work, seems the formatting on this page was hiding a few words of the code !
It does work!
Davinder Singh says
OK I found what the cause is:
HOTFIX http://support.microsoft.com/kb/2764343?wa=wsignin1.0 fixes the error
SP1 http://www.microsoft.com/en-us/download/details.aspx?id=35575 BREAKS IT AGAIN!!!!
Hotfix version is 11.0.2xxx.x
SQL2012 SP1 is version 11.0.3xxx.x
FIX IT MICROSOFT!!!!
Will Wainwright says
In SharePoint 2013 folder is:
Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ReportServer
Oly Mills says
Thank you very much!!! this has been plaguing my life!!!
Paulie says
Glad it helped! It was annoying me for ages as well!
Manoj Tandon says
Thanks a lot i was searching solution from one week.
its worked for me 🙂
Nick says
I fiexed the date problems, but I still have problems with the CSS of tha page.
( I create the folder 2057 and copy the content of 1033)
How can I fix it?
Nk
Nick says
[SOLVED]
I copied the page from the folder 14 hive, the page from 15 hive was right.
Thanks for the guide, I was going crazy
Paulie says
Well done, surprised to see how many people are having this problem actually. Amount of comments don’t really reflect how much traffic it is generating so there are a lot of people out there with the same issue.
Mike says
Thanks Paulie – you are a legend.
There is an existing Connect item for this issue so I’ve added a link to your blog post as a workaround.
All please vote to raise the priority of fixing this properly:
https://connect.microsoft.com/SQLServer/feedback/details/777829/sql-server-reporting-services-sharepoint-integration-culture-region-issue
Aggeliki SIlioni says
Your solution worked perfectly for me!!!
Thank you very much!
Chris OConnor says
This works OK for the “page display” reports – but NOT for the “ReportViewer” WEBPART… Has anyone noticed (or solved) this problem ??
JUAN P ISAQUITA P says
Hi, i have the same issue but in SharePoint 2013 and SQL Server 2014. i tried to add the culture to the ReportViewer and doesnt work.
Can you help me please-