Incorrect format of date report parameters via datepicker - Reporting Services

 Its good to have a calendar control in the new Reporting Services 2005 which wasn't available in the previous version.
 Good on you Microsoft but sorry the calendar control isn't working well.

 I was working on some reports and i noticed that when previewing the reports in Visual Studio or in the Report Manager site all seems good when i select a date from the date picker it does format accordingly to my culture setting which is en-AU
date format e.g dd/M/YYYY but when i'm loading the reports via the ReportViewer Page or from a webpart which uses the
Report Viewer and select a date using the date picker it sets it back to the American Culture settings which is m/d/yyyy.

I have set the language of the report itself to use English(Australia). You can set this by clicking on the Report on the properties pane >under Misc > Language  :
 
And thats not what i wanted and  i keep getting errors as the dates aren't correct  and users won't be happy.


So what i did was when i select the date picker and select a date i noticed it does a post back.
By looking at the URL string at the bottom of your browser quickly i noticed the Calendar&=LCID =127...
when viewing the reports via the ReportViewer Page or from a webpart  which is also using the ReportViewer  control

But when viewing the reports from the Report Manger the URL shows LCID = 3081 as i mentioned above

Solution:

So immediately  i knew something was and the last thing that came up my mind was to go directly to the ReportViewer.aspx  itself and add the Culture setting like this below


<%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage" Culture="en-AU"%>
as we can do that on every page

You can find the page here: C:\program files\microsoft SQL Server\MSQL.3\Reporting Services\ReportServer\Pages
But it depends on where you installed it.

Tip:
If you want to find the path to the page go to your IIS under Default website select ReportServer or Reports Folder > right click Properties...

Hope that helps



posted @ Thursday, June 26, 2008 7:10 PM

Print

Comments on this entry:

# re: Incorrect format of date report parameters via datepicker

Left by C Trimby at 7/30/2008 1:51 AM
Gravatar
This was incredibly helpful; thank you!

No thanks to Microsoft for making this so complicated as usual! Exactly how many times does Mr Gates need to be told that I'm not American??

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by tosh at 8/12/2008 4:22 PM
Gravatar
Great!! It helped us a lot. Thanks.

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Lemon at 8/19/2008 4:43 PM
Gravatar
Date picker format also depends on your browser settings.

If you go Tools->Internet Options...->Languages and change your language to/from American English, the date picker will change it's format to match...

In firefox it's Tools->Options->Content Tab->Choose

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by JD at 9/8/2008 10:33 PM
Gravatar
It could not help me. I am using report builder
I am using a date filter populated form database. Its a 'in-List' drop down filter with multiple election. When i create the filter , i could see the dates in proper format as "dd/mm/yyyy", but when i run the report as "RUN REPORT" or "Report Manager". The drop down shows "mm/dd/yyyy".

Please let me know.

Thanks in Advance..JD

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Hameer at 11/4/2008 10:05 PM
Gravatar
Hi and Thanks for the blog.
But, unfortunately its not helping me out. I have tried everything.

>> Changing the culture of report viewer page.
>> Changing browser language settings
>> Changing client regional settings
>> Chnaging server regional settings

But to n avail.

I am using SQL Server 2005 SP2 on Windows Server 2003 machine.

Please reply me asap.

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by salman at 11/13/2008 6:14 PM
Gravatar
thanks it really helped me and i was stuck in this issue and from your post i am able to fix that. thanks again

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Darragh Jones at 1/13/2009 2:25 AM
Gravatar
In you web.config, you could try adding the following:
<globalization culture="en-AU" uiCulture="en-AU" />

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Mark Underhill at 1/21/2009 2:44 AM
Gravatar
Thanks - changing the reportviewer.aspx solved this problem for me.

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by V.Manivannan at 1/27/2009 9:59 PM
Gravatar
Thanks , Your solution working fine

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Anthony Mongkolsakwanon at 2/12/2009 3:19 PM
Gravatar
Thanksssss, it is very useful for the rest of human..

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by roy at 2/23/2009 9:24 PM
Gravatar
Hi, I used that fix on my server to solve the problem once but I have the same problem on my PC when I use the preview inside visual studio 2005.

There isn't any ReportViewer.aspx for the visual studio.

:(

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Mritunjai at 3/10/2009 9:10 PM
Gravatar
I am facing same problem in SSRS report.through Datepicker i am entering data,in dd/mm/yyyy format.when i am entering 03-31-2008,its giving error.
Pls give me the solution

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Mritunjai at 3/10/2009 9:10 PM
Gravatar
I am facing same problem in SSRS report.through Datepicker i am entering data,in dd/mm/yyyy format.when i am entering 03-31-2008,its giving error.
Pls give me the solution

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by alex at 3/16/2009 5:24 PM
Gravatar
worked for me but had to reset the language setting on the browser to not default to english US

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by mel at 3/16/2009 11:04 PM
Gravatar
Many thanks this worked in our environment on the SSRS web, still have issues within the VS IDE, especially when showing the date parameters formatted as a string on the report. All is well when deployed to the server.

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by tom at 5/6/2009 11:32 PM
Gravatar
thank you, helped me out of a spot!

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Denis at 5/28/2009 4:35 PM
Gravatar
Being new to RS I was starting to dispair, THANK YOU

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Ronki at 6/8/2009 3:14 AM
Gravatar
Great it is very usefull

thanks a lot

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by Mad Mel at 6/28/2009 9:29 PM
Gravatar
Thanks, this solved the problem for me. A very useful bit of info.

# re: Incorrect format of date report parameters via datepicker - Reporting Services

Left by arnold at 7/16/2009 4:37 AM
Gravatar
This doesn't solve my problem.
Language should be en-US but in reportviewer, when I enter 12/31/2009 format, error occurs.

I already change the:
Culture of Report.aspx & ReportViewer.aspx
IE language setting
Client PC regional setting
Server regional setting

Pls. help. Thjanks.

Your comment:



 (will not be displayed)


 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345