• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Tachytelic.net

  • Get in Touch
  • About Me

SQL Server 2012 Reporting Services – Change format of Date Parameters

January 15, 2013 by Paulie 20 Comments

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.

Filed Under: Uncategorized

Reader Interactions

Comments

  1. Davinder Singh says

    January 22, 2013 at 1:20 pm

    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. Davinder Singh says

    January 22, 2013 at 3:17 pm

    Tried your method, but I get an error stating that the code isnt compiled for RSReportViewer.aspx

  3. Davinder Singh says

    January 22, 2013 at 3:38 pm

    This is what my RSReportViewer.aspx page tag looks like:

    Everytime I add the code UICulture=”en-GB” – it just seems to break!

  4. Davinder Singh says

    January 22, 2013 at 3:39 pm

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

  5. Davinder Singh says

    January 22, 2013 at 3:45 pm

    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.

  6. Paulie says

    January 22, 2013 at 5:00 pm

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

  7. Davinder Singh says

    January 23, 2013 at 8:26 am

    Many Thanks Paulie. Got it to work, seems the formatting on this page was hiding a few words of the code !

    It does work!

  8. Davinder Singh says

    January 23, 2013 at 1:26 pm

    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!!!!

  9. Will Wainwright says

    August 26, 2013 at 2:30 am

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

  10. Oly Mills says

    February 13, 2014 at 2:28 pm

    Thank you very much!!! this has been plaguing my life!!!

  11. Paulie says

    February 13, 2014 at 2:33 pm

    Glad it helped! It was annoying me for ages as well!

  12. Manoj Tandon says

    March 18, 2014 at 7:09 am

    Thanks a lot i was searching solution from one week.
    its worked for me 🙂

  13. Nick says

    March 18, 2014 at 2:55 pm

    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

  14. Nick says

    March 19, 2014 at 8:52 am

    [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

  15. Paulie says

    March 19, 2014 at 2:07 pm

    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.

  16. Mike says

    May 6, 2014 at 3:07 am

    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

  17. Aggeliki SIlioni says

    July 17, 2014 at 1:50 pm

    Your solution worked perfectly for me!!!

    Thank you very much!

  18. Chris OConnor says

    September 23, 2014 at 12:31 am

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

  19. JUAN P ISAQUITA P says

    November 8, 2016 at 2:04 am

    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-

Trackbacks

  1. Changing Date Parameterer to en-GB SSRS 2012 SharePoint Integrated mode | reshmeeauckloo says:
    December 24, 2015 at 4:02 pm

    […] https://tachytelic.net/2013/01/changing-the-format-of-date-parameters-on-a-sql-server-2012-report&#8230; […]

Leave a Reply Cancel reply

Primary Sidebar

Link to my LinkedIn Profile
Buy me a coffee

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 254 other subscribers.

Go to mobile version