Showing posts with label culture. Show all posts
Showing posts with label culture. Show all posts

Thursday, March 8, 2012

Culture Settings Problem

Hi everyone,
My name is Ed Allison. I am very new to reporting services (about 2 weeks,
in between working on a lot of other stuff), and have had no luck attempting
to track down a particular problem.
I am running Visual Studio 2005 and Reporting Services 2005 on Windows XP
(fully service packed etc.), but the data source for my reports is SQL
Server 2000. I only use VS2005 for reports, as we are still on vs2003 for
the rest of our products. It looks as if, somewhere along the line, a
culture setting has been set wrong. This problem is occurring at the design
stage, i.e. I have not loaded the reports onto the report server.
I am working in the UK. I have double checked that my regional and language
settings under Control Panel and they are set to English(UK).
Under Tools>Options>Environment>International Settings, Language is set to
'Same as Microsoft Windows'.
Whenever I format to currency (using "C" as the formatstring, generally),
the amount is returned in $, not £. Whenever I have date parameters on a
stored procedure for a report dataset, the dates are initially registered in
UK format (dd/mm/yyyy), but as soon as I click the 'view report button', the
dates are set in the parameter windows to mm/dd/yyyy format. This causes an
error when such a conversion yields an invalid date, e.g. '30/01/2006' to
'01/30/2006'.
I have searched in vain around visual studio 2005 for anything relating to a
culture setting specific to it without success. I have also tried MSDN and
Books Online, but no luck. I have checked every user account on my local
machine to see if one was entered with US culture settings, but no luck.
Report Services Configuration also does not appear to mention culture.
If anyone could help, I would be most grateful.
Ed AllisonI have found the solution to this, and am thoroughly embarrassed to have
missed it.
For the sake of anyone new like me who has a similar problem with their
culture settings apparently being ignored - there is a Language property on
the Report that defaults to English(United States). If this is set to the
global User.Language, formatting will correspond to culture settings on the
report client. This property is also present in individual textboxes.
"Ed Allison" <ed@.optix.co.uk> wrote in message
news:ODg7mZbJGHA.2628@.TK2MSFTNGP15.phx.gbl...
> Hi everyone,
> My name is Ed Allison. I am very new to reporting services (about 2
> weeks, in between working on a lot of other stuff), and have had no luck
> attempting to track down a particular problem.
> I am running Visual Studio 2005 and Reporting Services 2005 on Windows XP
> (fully service packed etc.), but the data source for my reports is SQL
> Server 2000. I only use VS2005 for reports, as we are still on vs2003 for
> the rest of our products. It looks as if, somewhere along the line, a
> culture setting has been set wrong. This problem is occurring at the
> design stage, i.e. I have not loaded the reports onto the report server.
> I am working in the UK. I have double checked that my regional and
> language settings under Control Panel and they are set to English(UK).
> Under Tools>Options>Environment>International Settings, Language is set to
> 'Same as Microsoft Windows'.
> Whenever I format to currency (using "C" as the formatstring, generally),
> the amount is returned in $, not £. Whenever I have date parameters on a
> stored procedure for a report dataset, the dates are initially registered
> in UK format (dd/mm/yyyy), but as soon as I click the 'view report
> button', the dates are set in the parameter windows to mm/dd/yyyy format.
> This causes an error when such a conversion yields an invalid date, e.g.
> '30/01/2006' to '01/30/2006'.
> I have searched in vain around visual studio 2005 for anything relating to
> a culture setting specific to it without success. I have also tried MSDN
> and Books Online, but no luck. I have checked every user account on my
> local machine to see if one was entered with US culture settings, but no
> luck. Report Services Configuration also does not appear to mention
> culture.
> If anyone could help, I would be most grateful.
> Ed Allison
>

Culture settings of SSRS2005

Hi,
I have have a problem with the culture settings in reporting server 2005,
which is different from 2000.
My windows is in german, but I installed the english version of SSRS and
VS.NET.
So the report viewer is displayed in English.
I have a public report parameter defined as date, with default value as
Date.Now(), shown in English Format.
If I view the report with the default values, he complains that he can't
convert the date, he wants the german format.
My question now:
- Why he fills the default value in English, but for working he needs the
german format? It's seems like there are different cultures. With SSRS 2000
this was different.
- How defines SSRS2005 the used culture for formatting and UI?
By Browser? Report cutlure settings? Windows Culture?
Is there any documentation?
Thanks
EricHi Eric,
Thank you for posting.
Regarding on the culture setting question you mentioned, based on my
understanding, the ReportViewer control is shipped with the VS 2005
development tool , so the UI on the reportviewer is not related to the SQL
Server reporting service. As for SQL Server 2005 reporting service, there
does exists globalization/localizaiton features which depend on the host
machine's locale/language setting and the client-side browser's language
setting. For detailed info, you can have a look at the following MSDN
document:
#International Considerations for Reporting Services
http://msdn2.microsoft.com/en-US/library/ms156493(SQL.90).aspx
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Culture problem with datepicker in report parameters

Hi,
on the server of a customer I determined the following problem: The customer
installed an English operating system (Windows server 2003) with English SQL
server 2005. I go from a German Client on a report about http://
<servername>/reports (report managers) to calendars in the report parameters
with German format of date as expected there. So far, so well. I turn into
however http:// more <servername>/reportserver on report, are indicated now
everything correctly in the report parameters on German represented indicate
(Tooltips, "Bericht anzeigen" (show report). etc.), only the calendar
strangely enough is in the English format of date. I have tested the same
configuration (likewise with English operating system and English Sql
server; german Client) on a virtual server, and can not reproduce the
problem here. Someone an idea, why I do not get the calendar at the customer
in accordance with the language settings of the client as expected?
Thanks and regards,
StefanHello Stefan,
I would like to know what's the server Regional Setting.
Also, please applied the latest service pack to your server and let me know
the result.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello Wei Lu,
the Regional Setting of the Server is German.
I will ask the customer, if they have installed the latest service pack. As
far as I know, they have installed SP2.
Thanks and regards,
Stefan Dirks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:PsMLICbnHHA.1140@.TK2MSFTNGHUB02.phx.gbl...
> Hello Stefan,
> I would like to know what's the server Regional Setting.
> Also, please applied the latest service pack to your server and let me
> know
> the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei Lu,
the customer has installed SQL Reporting Services Version 9.00.3042.00.
It's strange that every reporting parameter (e.g. Tooltip) is in german
except for the calendar. Is there a possibility to set the
calendar-parameter explicit to german?
I tried to set the default language of the Reports to german/User!Language
but with no effect.
Thanks Stefan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:6tvedcQoHHA.5168@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Stefan,
This is a known issue in the reporting Services SP2. Product team is still
working on it. I will inform you the update if any progress.
Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei Lu,
thanks for this information. I use in the meantime a ReportViewer on a
aspx-Site as a workaround.
Thanks,
Stefan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:39vfU9ooHHA.1428@.TK2MSFTNGHUB02.phx.gbl...
> Hello Stefan,
> This is a known issue in the reporting Services SP2. Product team is still
> working on it. I will inform you the update if any progress.
> Thank you!
>
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>

Culture overriding custom format

Hi, I've been having a weird problem with a report I'm making. I've done douzan of em, and the problem only appeared in one. Let say I have a text field, and I give it a format property (for the sake of the example, imagine its a date, and I set it as yyyy/MM/dd. Same result if I would use an expression with the Format function).

Now, depending on culture, the slashes gets overrided. Everything else work (so if I put yyyy/MM, the format is recognised and the day won't show...but it will use dashes instead of slashes, for example, with us culture).

How do I get it to always respect my format? I have, like I said, douzans of other reports and it works fine, the format string gets applied exactly: I don't know what the hell I could have changed. All the culture settings are at default, like in the reports that do work... I've tried diff-ing the source, can't see anything weird, but I'm sure I'm just being blind.

Any ideas?

Thank you.

The DateSeparator is defined on the DateTimeFomatInfo objects and the slash is being "translated" to the current culture.

If there's not an option to have the slash in the format string not interpreted as a DateSeparator, the only thing I can think of is to add a .Replace(CultureInfo.CurrentCulture.DateTimeFormat.DateSeparator, "/") to the end of your Format statement.

|||

Just found this stumbling around on something else. Try "yyyy'/'mm'/'dd" as your format string. Found ithere, so you can fuss at Microsoft if it doesn't work.

|||

Makes sense. Yeah, escaping the slashes (let say, yyyy\/MM\/dd ) worked too.

But then, what do I do with numeric formats? (since the date was just an example). #,##0.00
Works fine in most of my reports, but in that particular one, no matter what format I put, the number gets translated with the current culture. What mostly gets me, is that it works in all the reports! Just not -that- one...ugh.|||

Those separators are also defined in a culture-specific way. I'd recheck that one report and make sure that you haven't accidentally specified a culture or that you did specify a culture on the other reports.

|||

Yup, you're right... I'm baffled, I tested the other reports, and not only did they have cultures set, but the formats never worked (I had a formula that switched the Language setting depending on a parameter set by the user, and the culture I always ended up printing my report coincidently had the correct separators).

My apologies for misleading you, I know it can be annoying when you're trying to help someone and they give you the wrong info :)

At least now I know I can backslash escape the magical separators... That is quite awkward that it does that, especially since its a bit different from the behavior of .NET formatters... Oh well!

Culture in MSSQL 2005 express edition

i am trying to add xml to the xml data type column. The xml contains both
english and hebrew characters. English characters are saved well, but hebrew
saved as "''?" how can i fix it?Try converting the xml to varbinary(max) before inserting. From BOL:
Text Encoding
SQL Server 2005 stores XML data in Unicode (UTF-16). XML data retrieved from
the server comes out in UTF-16 encoding. If you want a different encoding,
you have to perform the required conversion on the retrieved data.
Sometimes, the XML data may be in a different encoding. If it is, you have
to use care during data loading. For example:
a.. If your text XML is in Unicode (UCS-2, UTF-16), you can assign it to
an XML column, variable, or parameter without any problems.
b.. If the encoding is not Unicode and is implicit, because of the source
code page, the string code page in the database should be the same as or
compatible with the code points that you want to load. If required, use
COLLATE. If no such server code page exists, you have to add an explicit XML
declaration with the correct encoding.
c.. To use an explicit encoding, use either the varbinary() type, which
has no interaction with code pages, or use a string type of the appropriate
code page. Then, assign the data to an XML column, variable, or parameter.
Example: Explicitly Specifying an Encoding
Assume that you have an XML document, vcdoc, stored as varchar(max) that
does not have an explicit XML declaration. The following statement adds an
XML declaration with the encoding "iso8859-1", concatenates the XML
document, casts the result to varbinary(max) so that the byte representation
is preserved, and then finally casts it to XML. This enables the XML
processor to parse the data according to the specified encoding "iso8859-1"
and generate the corresponding UTF-16 representation for string values.
SELECT CAST(
CAST (('<?xml version="1.0" encoding="iso8859-1"?>'+ vcdoc) AS VARBINARY
(MAX))
AS XML)
David Barber [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"michael" <michael@.discussions.microsoft.com> wrote in message
news:19B65A8D-E246-46EB-A85B-C517D1830BAD@.microsoft.com...
> i am trying to add xml to the xml data type column. The xml contains both
> english and hebrew characters. English characters are saved well, but
hebrew
> saved as "''?" how can i fix it?|||Thanks a lot
"David Barber [MS]" wrote:

> Try converting the xml to varbinary(max) before inserting. From BOL:
> Text Encoding
> SQL Server 2005 stores XML data in Unicode (UTF-16). XML data retrieved fr
om
> the server comes out in UTF-16 encoding. If you want a different encoding,
> you have to perform the required conversion on the retrieved data.
> Sometimes, the XML data may be in a different encoding. If it is, you have
> to use care during data loading. For example:
> a.. If your text XML is in Unicode (UCS-2, UTF-16), you can assign it to
> an XML column, variable, or parameter without any problems.
>
> b.. If the encoding is not Unicode and is implicit, because of the sourc
e
> code page, the string code page in the database should be the same as or
> compatible with the code points that you want to load. If required, use
> COLLATE. If no such server code page exists, you have to add an explicit X
ML
> declaration with the correct encoding.
>
> c.. To use an explicit encoding, use either the varbinary() type, which
> has no interaction with code pages, or use a string type of the appropriat
e
> code page. Then, assign the data to an XML column, variable, or parameter.
>
> Example: Explicitly Specifying an Encoding
> Assume that you have an XML document, vcdoc, stored as varchar(max) that
> does not have an explicit XML declaration. The following statement adds an
> XML declaration with the encoding "iso8859-1", concatenates the XML
> document, casts the result to varbinary(max) so that the byte representati
on
> is preserved, and then finally casts it to XML. This enables the XML
> processor to parse the data according to the specified encoding "iso8859-1
"
> and generate the corresponding UTF-16 representation for string values.
>
> SELECT CAST(
> CAST (('<?xml version="1.0" encoding="iso8859-1"?>'+ vcdoc) AS VARBINARY
> (MAX))
> AS XML)
>
> --
> David Barber [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "michael" <michael@.discussions.microsoft.com> wrote in message
> news:19B65A8D-E246-46EB-A85B-C517D1830BAD@.microsoft.com...
> hebrew
>
>