2
votes

I've spent many hours searching on Internet but kind of desperate at this point.

We have a report having two DataSet fields defined as

Date_Difference = Round((DateDiff("d", Fields!StartDate.Value, Fields!EndDate.Value))* Fields!ProjectStatusPct.Value)

status_date = CDate(DateAdd("d", Fields!Date_Difference.Value, Fields!StartDate.Value))

Both SSRS and BIDS are installed on the same server(VM, Windows Server 2008 R2). The Region, Language, Format, everything i can think of on the machine is configured as en_US.

The language in report property is en-US, also i have this en-US defined in the report code to be sure.

<Language>en-US</Language>

Also in reportViewer.aspx, i changed

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage"%>

to

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

as suggested by some post.

The data source server(MSSQL 2008, on the same machine) Language is en-US as well.

The report looks fine in the BIDS designer. However, when i deploy it to the server, the date format get messed up. The Reporting Server takes MM/dd/yyyy(US format) as dd/MM/yyyy (Canada format). As a result, the status_date field is always generating wrong date, or NULL if it comes to a date like 03/31/2012

When I look at the SSRS log files, the header always displays as

   <Header><Product>Microsoft SQL Server Reporting Services Version 2007.0100.5500.00 ((Katmai_PCU_Main).110922-0336 )</Product><Locale>English (Canada)</Locale><TimeZone>Pacific Daylight Time</TimeZone><Path>C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\Logfiles\ReportServerService__06_07_2012_16_30_41.log</Path><SystemName>KAM1ODDBS06</SystemName><OSName>Microsoft Windows NT 6.1.7601 Service Pack 1</OSName><OSVersion>6.1.7601</OSVersion><ProcessID>1160</ProcessID></Header>rshost!rshost!ec0!06/07/2012-16:30:41:: i INFO: CLR runtime is initialized.

So I think the BIDS takes the local machine's language setup then it handles the date correctly.

More information :

  • the brower(IE) 's language is en_US
  • when i deploy the report to other reporting server having en_US locale, it works.

My question is, how to change this reporting server's locale to en_US as well?

1
Just wanted to add that this user found the answer for themselves after posting the question on an MSDN forum group. The final text of that answer was, "it turns out that the service account of SSRS has to be in en-US region.". So if you're running into a similar issue, please log out and log back in as the user set as the execution account and check that user's regional language setting.idclaar

1 Answers

0
votes

I think setting the Server Language might fix it. There are two levels of assigning the locale one is at the Report Level and other at the TextBox or field level if you may. Check what is there in your field. Just in case you might be also interested in this one http://technet.microsoft.com/en-us/library/ms155064(v=sql.100).aspx it talks about the case which you have described.