Hi there!
I'm using Telerik Reporting Q1 2009 in a CAB WinForms application (along with RadControls for WinForms) under Windows Vista. I need to provide a globalized version of some reports where the user can chose the language of a report from the application's UI.
As proposed in the documentation I designed the report in the default language (here: German). After this I set the Localizable property of the report to True in the report designer, changed the Language property of the report to the desired language (here: English (US)) and localized all strings used in the report form. After saving, I got two resource files as expected, one for the default language (MyReport.resx), one for the localized version (MyReport.en-US.resx), both containing the correctly localized string resources. Compiling the project also results to a proper satellite assembly for the localized culture, residing in a subfolder named by the culture:
.\MyReport.dll
.\en-US\MyReport.resources.dll
These file/folder structure is also copied to the application's bin folder, along with all other depedent assemblies etc.
As far as I see this is all correct behavior until here.
In the application I use the following code to set the report's Culture property to the desired one, lets say English US):
The report will get rendered in another place, once as PDF and once by the WinForms ReportViewer:
As you see this code is also no rocket sience.
My Problem is that the report always keeps it's default language and will never show in English (US) as desired, regardless of the above mentioned conditions (report localized, got satellite assemblies in the right place [assumedly], report's Culture property explicitly set). I also set the current thread's CurrentUICulture property to english, as well as the whole operating system's default language - but the report still stays "unlocalized". So the problem seems to be that for some reason the satellite assembly won't get used for localization.
Does anyone has a helpful hint what the problem could be here?
Regards,
ReneMT
I'm using Telerik Reporting Q1 2009 in a CAB WinForms application (along with RadControls for WinForms) under Windows Vista. I need to provide a globalized version of some reports where the user can chose the language of a report from the application's UI.
As proposed in the documentation I designed the report in the default language (here: German). After this I set the Localizable property of the report to True in the report designer, changed the Language property of the report to the desired language (here: English (US)) and localized all strings used in the report form. After saving, I got two resource files as expected, one for the default language (MyReport.resx), one for the localized version (MyReport.en-US.resx), both containing the correctly localized string resources. Compiling the project also results to a proper satellite assembly for the localized culture, residing in a subfolder named by the culture:
.\MyReport.dll
.\en-US\MyReport.resources.dll
These file/folder structure is also copied to the application's bin folder, along with all other depedent assemblies etc.
As far as I see this is all correct behavior until here.
In the application I use the following code to set the report's Culture property to the desired one, lets say English US):
Report report = new MyReport(); |
report.Culture = new CultureInfo("en-US"); |
report.DataSource = someDataSet; |
The report will get rendered in another place, once as PDF and once by the WinForms ReportViewer:
string mimeType = ""; |
string extension = ""; |
Encoding encoding = null; |
Hashtable deviceSettings = new Hashtable(); |
deviceSettings["FontEmbedding"] = "Subset"; |
deviceSettings["DocumentTitle"] = report.DocumentName; |
deviceSettings["DocumentAuthor"] = "My Company"; |
byte[] buffer = |
Telerik.Reporting.Processing.ReportProcessor.Render("PDF", report, deviceSettings, out mimeType, out extension, out encoding); |
// ... save the PDF using FileStream ... |
// WinForms initialization code |
private Telerik.ReportViewer.WinForms.ReportViewer mainReportViewer; |
// .... |
public void ShowReport(Report report) |
{ |
mainReportViewer.Report = report; |
mainReportViewer.RefreshReport(); |
} |
As you see this code is also no rocket sience.
My Problem is that the report always keeps it's default language and will never show in English (US) as desired, regardless of the above mentioned conditions (report localized, got satellite assemblies in the right place [assumedly], report's Culture property explicitly set). I also set the current thread's CurrentUICulture property to english, as well as the whole operating system's default language - but the report still stays "unlocalized". So the problem seems to be that for some reason the satellite assembly won't get used for localization.
Does anyone has a helpful hint what the problem could be here?
Regards,
ReneMT