Incorrect format for date params (SSRS Integrated mode or using Report Viewer web part)

Yesterday I had a client ring me up saying some reports i deployed for testing were not functioning. The issue was that an input paramter of Date type was not accepting the date they chose – if they used the calendar picker. They got the error: “The vvalue provided for the report Parameter ‘Date’ is noty valid for its type.:

I am in Australia and we use the non-US (and more generally used) dd/mm/yyyy format in our dates. Closer inspection showed that after the users picked the date it was actually filling in the parameter using the incorrect (i.e. US) format: mm/dd/yyyy. We checked the locale settings in the report definition and the server itself and all was well: en-AU

The fix for this was found via google and another Aussie seems to have run across this problem

Essentially you need to edit the ReportViewer.aspx file and add the culture setting. The file is here by default:

C:\program files\microsoft SQL Server\MSQL.3\Reporting Services\ReportServer\Pages

At the top the page directive needs a change, as shown:

<%@ Page Language=”C#” AutoEventWireup=”true” Inherits=”Microsoft.ReportingServices.WebServer.ReportViewerPage” Culture=”en-AU”%>

Check out the comments on the link for some alternate solutions too.. it seems this fix did work for everyone.

Advertisements

3 Responses to Incorrect format for date params (SSRS Integrated mode or using Report Viewer web part)

  1. […] This post was mentioned on Twitter by Stray__Cat, Bhavik Merchant. Bhavik Merchant said: [Blog] solving locale/date format issues for #SSRS Date params in #Sharepoint: http://bit.ly/f4puOj (most of the world is NOT american!!) […]

  2. Thanks Bhavik – p.s. for SQL2012 it has to be “UICULTURE” – not “CULTURE”…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: