on 04-24-2014 11:03 AM
Hello Community, Don, Ludek and Bhushan!
From my last discussion http://scn.sap.com/message/14970847 I learned the following considering the localization of report documents.
1.) Before the report is loaded into the viewer, the LocaleID must be set. This is done by calling "report.ReportClientDocument.LocaleID". There is the enumeration "CeLocale" in CrystalDecisions.ReportAppServer.CommonControls. Take one of the values out of this enumeration for your localization.
2) There is an UFL which could be installed and registered. C++: http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_b...
Now there is one point missing. To describe the setup of my dev machine:
Operating system: "Windows 7 EN"
Regional settings: "Austria"
If I start my application with "English" as language, the text fields in the report are replaced with the english resources. However, the report viewer is still displayed with german tooltips and menus.
Is there a way to change the language of the ReportViewer control within my source code?
Here you see the screenshot of the report viewer. The application is running with the language set to "english" but the menu still shows the german resources like "Bericht exportieren" or "Vorschau".
Thank you for your support.
Hi Alexander,
There is a great tool call the Object Browse in Visual Studio. Ever tried using it?
Another option is if you simply type in your view report routine:
crystalReportViewer1. and Intelli-sense pops up with the values availalbe and hey... how about that
New info, to set the viewer the same as use this, it will select the same language as selected before opening the report:
x = (int)rpt.ReportClientDocument.LocaleID;
crystalReportViewer1.SetProductLocale(x);
Then you look up LCID in MSDN:
And you get the locale ID num's or Strings to add.
How you handle that part is up to you....
Thanks again
Don
PS - sorry for sounding sarcastic but seems a lot of Developers lately are not even looking into what is available, it's just easier to post here...
I'll also add this one line of code to the kbase I wrote with the info from the other post.
2003581 - How to set the Localization for a Crystal Reports .NET application
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Don!
Nice to hear from you again.
Yes, I know what the Object Broswer is. The sad thing is that the SetProductLocale Method is included in the Windows Forms assembly.
As I have stated in the Thread title I need it for the WPF control.
So I have to call
crCrystalReportViewer.ViewerCore.ProductLocale = new CultureInfo(twoLetterLanguageCode);
Thank you for the tip and the kind help. Yes, russion is supported by the viewer control although i have the next issue .
Alex
To your PS: I fully understand your critics and why I have upset you. Please forward the next points to the responsible persons.
Hi Alexander,
Understandable.... Our help files are kept up to date at this location:
Makes it easier to keep them updated there than ship them and then figure out a way to update the local copies. It's the way of documentation now, since everyone has access to the WEB why not put then up there than have local copies....
As you know there are so many different ways of doing things in .NET, not just CR runtime.... But especially true for CR runtime, which one to use and when is complicated and I've seen code sampels from users and developers that accomplish the same thing but in completely different process...
So totally understandable, I forget sometimes that I've looked at our API's for 17 years now and not everyone has my history.... CR API's can be overwelming at times... A lot easier when we just had WIN32 and crpe32 to program in....
Thanks again and have a great day
Don
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.