Showing results for 
Search instead for 
Did you mean: 

Cannot create/view report when Locale is Turkish

Former Member
0 Kudos


We have an application running on XP, with Java 1.6, reporting with CrystalReports 11 ( Everything is fine when the locale (Locale.getDefaultLocale()) is US (English), but reporting does not work when the locale is Turkish (TR) even when we set the locale of ReportClientDocument and ReportViewerBeam to Locale.US.

In Turkish there are special characters that are not in Latin alphabet, such as ?,?,ç etc. and the problem seems to be occurred due to use of "String.toUpperCase" method with no locale argument (so it uses the default Locale) in CrystalReports JARs, while the uppercase of "i" in Turkish is not "I", but a different character a "?".

Does anyone has an idea about how to solve this problem? Is there a bug-fix?

Thanks in regards,


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

<p>There are a few issues with how different language text are rendered in the viewer. For example, there is a known issue listed in the <a href="/node/447" target="_blank">release notes</a>, where certain chars are converted to ? marks. I&#39;m not sure if this is the issue you are running into but try search the forums and the kbase to see if you can find your particular issue. </p><p>-MJ</p>

Former Member
0 Kudos

I should add that if this is not the issue or if you cannot find anything already documented, please provide additional information such as:

1) Additional description details about the symptom you are experiencing.

2) Does the issue occur viewing in the Crystal Reports viewer or when exported? If when exported, which formats have you tried and do they all experience the same issue.

3) Where do you use the String.toUpperCase() method call? Are you referring to a function found in the CR formula editor?

4) What is the database the report is reporting off of? What kind of connectivity is being used (ie: JDBC, POJO, etc)?

5) Are the Turkish chars coming from a data source or can you repro the issue with some static text in a report's text object?


Former Member
0 Kudos

First of all thank you for your response.

The issue is different than you are thinking and I could not find any related documentation on web/BO forums. Let me first summarize the issue we are experiencing:

We are developing a Java (1.6) application which has a functionality to produce reports using CrystalReports. We have internationalization support and at the moment support Turkish and English languages. What we do at the start-up is setting the default locale as the desired language by User (i.e. Locale.setDefault(Locale.US)). Our reports work fine when the locale is US (English), but does not work and throws the below exception when the locale is Turkish. Failed to setup the formula service!---- Error code:-2147467259

When we trace the code in Debug mode by putting a breakpoint at String.lowerCase method, we see that CR library makes call for lowerCase (without giving a locale as parameter) then String.lowerCase method uses the default locale (which is Turkish) and lower-case "Int" (which is a build-in Math function in CR) as "?nt" (not "int") and finally CR throws the exception.

You can reproduce the issue for instance by using the sample code (October05 - For XI Release2) distributed by CR. JRCViewReport works fine without any modifications but if you put "Locale.setDefault(new Locale("tr"));" inside "launchApplication()" method, the problem occurs. (I believe that it is possible to reproduce the issue in any report viewer code by adding the code that changes the default Locale to Turkish.)

I think any of the following solutions could be applied:

- Use locale of ReportViewerBean's locale as parameter,

- Use locale of ReportClientDocument's locale as parameter,

- Use "Locale.US" as parameter

when calling String.loweCase/upperCase/equalsIgnoreCase.

I guess this time the problem is clearly described. We need a quick solution/patch for the issue since we have a delivery to the customer in 2 weeks. I'm looking forward to hearing good news from you.

Kind regards,


PS: The answers for your other items are as follows:

2) In Crystal Reports Viewer,

3) We dont use the String.toUpperCase() method, but the CrystalReports library does.

4) The database is Oracle 10g, the connectivity is JDBC.

5) Neither

Former Member
0 Kudos

Thanks for the helped me better understand the issue!

I followed your steps but I was not able to repro the issue. I used the sample app you referred to (with the sample report it came with) and I added the line of code to change the Locale in the LaunchApplication() method. I tried Locale.US, Locale.French, and "tr", and they all worked; meaning that the report rendered the report with data, and without errors. NOTE: When I used "tr", the viewer displayed the strings in English since Turkish is not a language that we have tested for (thus not officially supported).

Also, I tried the sample app with both JRE 1.5 and 1.6 and both worked, even thought 1.6 is not a supported version.

Does the report that comes with the sample work for you? Did you have to modify the sample report to cause the error to occur? I did create a new blank report and added a formula that uses the Int() and UpperCase() built-in functions, but they didn't cause any errors.

Also, can you try the non-working sample with the 1.5 JRE to make sure the issue not related to 1.6.

Also, just so that expectations are correctly set, we're still working out details but the next patch update isn't expected until late this year (~Nov/Dec). If we can confirm this as a bug then the earliest we can have a fix is the next patch. I'll do my best to help you find a resolution as quick as possible!