This is a migrated thread and some comments may be shown as answers.

Problem with localizing reports Q3 2010 SP1

11 Answers 166 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thomas Sonnenschein
Top achievements
Rank 2
Thomas Sonnenschein asked on 17 Jan 2011, 07:39 AM
Hello,

  I have a massive problem on localizing my Reports with the actual Version (Q3 2010 SP1 / 2010.3.1221). I have some reports in german and english. In my report preview window I have a dropdown to switch the report language. This works fine in VS 2010. But when I deploy my application to a Win2003 Server, the problems start. No matter, what language I set in my dropdown, the report is always in german (which is the default language). For switching between the languages I use:
Thread.CurrentThread.CurrentUICulture
and
Thread.CurrentThread.CurrentCulture

The same application deployed to Windows Azure with Telerik Reports Version Q2 2010 (2010.2.921) works perfect. Have I to change something in my application to let it work again or is there a bug in the actual report release?

In hope of help
 Thomas

11 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 17 Jan 2011, 02:36 PM
Hi Thomas,

Are you by any chance using the Silverlight report viewer - if yes, this is a known problem that slipped into the Q3 release and would be addressed in the upcoming Q1 release (or earlier internal builds).
If you're not using the Silverlight viewer, then we cannot reproduce the issue - I've attached a sample project that shows our observations with the latest official Q3 SP1 release.

Greetings,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 19 Jan 2011, 04:08 PM

Hi

We are using SL I we can reproduce the problem.

Do you have a workaround?

I need to set the cultureUI and Culture on the SL Client and send to the report server,
I have tray passing as paramenter but the culture must be set before the InitializeComponent()
The problem is that before the InitializateComponent() I don't have the parameters...

Any idea how to fix this?

Thank you

public Report1()
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(
this.ReportParameters["lg"].Value.ToString())




            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
0
Thomas Sonnenschein
Top achievements
Rank 2
answered on 20 Jan 2011, 08:14 AM
Hello,

  thanks for your response. I tried your solution and added a Webinstall Project to it. With that, installed on my server the report works fine in all selected languages. Back to my project, where I work exact like in your sample, I than found, that the ressource dlls where not copied to the server. So the reports always show the default texts.
The problem don't ocure in the Telerik Report, but in the installer. After copiing the ressource dlls to the bin folder on the server, the localization work fine.

Now I have only to research, why the ressources are not copied during installation, but that is not a Telerik problem.

Thanks
  Thomas
0
Steve
Telerik team
answered on 20 Jan 2011, 08:23 AM
Hi guys,

@Iosu: We're working on fix that would be part of an internal build that is to come in the next few days.

@Thomas: We're glad it is working on your end as well.

Regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 23 Jan 2011, 02:16 PM
Hi..

I have just download the last bits,,
On the change log I can see..

Report Service

  • Fixed: Cannot localize a Report using the Localizable property


Do you have an example on how to set the culture and cultureUI from the SL viewer???

Thanks
0
Steve
Telerik team
answered on 24 Jan 2011, 04:17 PM
Hi Iosu,

You set the Culture and CurrentUICulture in the Silverlight application e.g. button click. It would be automatically picked up by the report and respected.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 24 Jan 2011, 04:36 PM
HI

Yes, I have check it and it works... When I set the on the SL Client.
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ca");
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-UK");

my report UI is in "ca" and the format of dates etc is in English
That's ok

But my question was diferent.

My solution can have the cultureUI in spanish, but I want to send a "Sales quote report" to a customer that is on UK.. so I want to send the report in english... JUST the report, so If I change the cultureUI on the SL cliente, the all interfase is change to English..and I don't want this..

That's way I want to be able to send a parameter to the report server with the culture and language  (independed of the SL client Language)... Any trick how to to that???
The best way would be if I can override the DeviceCreateInfo on the SL Cliente or... The SL ReportViewer have bouth parameters, Culture and language

Thanks

Hi I have found another problem..if I set on a report a format to a date field like "{0:d}" and I change the culture the Date format is not changed, so for example.. In Spain the date should be "24/01/2010" but it shows "01/24/2010"  if I remove the format the the change of the culture is corrent.
I can not upload a zip file here so I have create a support Ticket 387265




0
Iosu Buenetxea
Top achievements
Rank 1
answered on 25 Jan 2011, 08:14 PM

Let's keep here..

On my example there is a Web and SL Project. Set the Startup project to web and you will see that there is no way to set the culture of the report because the SL Viewer does not have the  culture property. So if you run the sl example the DATE field with a format is not correctly formated to the SL client culture.

The big issue for us is as I told you yesterday:

My solution can have the cultureUI in spanish, but I want to send a "Sales quote report" to a customer that is on UK.. so I want to send the report in english... JUST the report, so If I change the cultureUI on the SL cliente, the all interfase is change to English on the SL app..and I don't want this..

That's way I want to be able to send a parameter to the report server with the culture and language  (independed of the SL client Language)... Any trick how to to that???
The best way would be if I can override the DeviceCreateInfo on the SL Cliente or... The SL ReportViewer have bouth parameters, Culture and language

and also for sure that we want to be able to give a format to DATE a Numbers. But the format must be able to change to the one set on the SL Viewer.

Thank you

0
Steve
Telerik team
answered on 28 Jan 2011, 05:34 PM
Hi Iosu,

After further look into your project, we noticed that the culture does not fall back automatically to the current thread, because you have at some point set culture for this report through the Culture property. Then while playing around you probably decided to remove the culture, but instead of resetting the Culture property you've set it to (Default) from the DropDownList, which for some obscure reason serializes the following in the InitializeComponent method:

this.Culture = new System.Globalization.CultureInfo("");

After resetting the Culture property, this line is gone and the formatting works correctly without any further modifications in any of the supported platforms.

As for your inquiry, we do not notice such an observation, on our end. Changing only the CurrentUICulture only changes the UI and not other attributes which are in the domain of the CurrentCulture. You can see a short video with your project along with the revised project.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
radhika
Top achievements
Rank 1
answered on 21 Jan 2016, 09:52 AM

Hello, 
public Form1()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");  //get input string from report parameters
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); //get input string from report parameters
            InitializeComponent();
        }

this approach works properly, but only if we write set CutureCode before InitializeComponent(); Not after it. Is there Any alternative possible for that?

Also How do I get Report Parameters directly in construtor for achieving this kind of approach ->
"System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");  //get input string from report parameters i.e parameters["CultureInfoCode"].value"

0
Stef
Telerik team
answered on 21 Jan 2016, 05:47 PM
Hi Radhika,

Please check my last post in the Report Localization / Globalization Problem forum thread.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Thomas Sonnenschein
Top achievements
Rank 2
Answers by
Steve
Telerik team
Iosu Buenetxea
Top achievements
Rank 1
Thomas Sonnenschein
Top achievements
Rank 2
radhika
Top achievements
Rank 1
Stef
Telerik team
Share this question
or