Changing the format of date parameters on a SQL Server 2012 reporting services report that is Sharepoint Integrated

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:

http://technet.microsoft.com/en-us/library/cc287874(v=office.12).aspx” title=”http://technet.microsoft.com/en-us/library/cc287874(v=office.12).aspx

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.

20 thoughts on “Changing the format of date parameters on a SQL Server 2012 reporting services report that is Sharepoint Integrated

  1. 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.

  2. %@ 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″ %

  3. 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.

  4. 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" %>

  5. In SharePoint 2013 folder is:
    Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ReportServer

  6. 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

  7. [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

  8. 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.

  9. This works OK for the “page display” reports – but NOT for the “ReportViewer” WEBPART… Has anyone noticed (or solved) this problem ??

  10. 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-

Leave a Reply

Your email address will not be published. Required fields are marked *