Hello,
I have a question about setting a report's culture for displaying the correct decimal-format.
This format should be according to the Dutch-culture (nl-NL). After instantiating a StiReport, the AutoLocalizeReportOnRun property is set to true, which tells the report to use the culture of the system it is operating on, right? But due to problems with our database-backend we have to set the Thread.CurrentThread.CurrentCulture to en-US every time we access the database. So, to overcome this problem I need to set the Thread.CurrentThread.CurrentCulture to nl-NL just before the reports takes over this culture due to the AutoLocalizeReportOnRun property. How can I do this? Is there an event for this?
Regards,
René
Culture of Report
Culture of Report
Hi René,
Here is the code which helps to localize the preview and designer:
AutoLocalizeReportOnRun function will help you when you are using 'Globalization' feature of the report and you have some cultures 'inside' of the report, please see
'C:\Program Files\Stimulsoft Reports.Net 2008.2 Trial\Samples\C#\GlobalizedReport\' sample project for more details.
Thank you.
Could you please explain these problems you have with database access?semtec wrote:But due to problems with our database-backend we have to set the Thread.CurrentThread.CurrentCulture to en-US every time we access the database.
Here is the code which helps to localize the preview and designer:
Code: Select all
Stimulsoft.Report.StiConfig.Load();
//Here you could specify the folder with localization files:
//Stimulsoft.Report.StiOptions.Configuration.DirectoryLocalization = ...;
Stimulsoft.Report.StiOptions.Configuration.SearchLocalizationFromRegistry = false;
Stimulsoft.Report.StiConfig.LoadLocalization("en.xml");
Stimulsoft.Report.StiOptions.Configuration.Localization = "en.xml";
Stimulsoft.Report.StiConfig.Save();
'C:\Program Files\Stimulsoft Reports.Net 2008.2 Trial\Samples\C#\GlobalizedReport\' sample project for more details.
Thank you.
Culture of Report
Hi Edward,
Now, I don't need to localize the report for translation purposes. I just need to manually set the system's Thread.CurrentThread.CurrentCulture to nl-NL in a way that, when the report is shown, printed or designed, it has that specific culture. Keep in mind that at report.RegData, the database is hit, and the culture will be set to en-US!
I hope you understand this problem.
Regards,
René
When we use the nl-NL culture, the dataprovider for our database (informix) returns decimals multiplied by 1000. This is a bug in the Informix.Net provider, which won't be solved for long. There is a workaround, that's to set the Thread.CurrentThread.CurrentCulture to en-US every time we do a CRUD-operation.Edward wrote:Could you please explain these problems you have with database access?
Now, I don't need to localize the report for translation purposes. I just need to manually set the system's Thread.CurrentThread.CurrentCulture to nl-NL in a way that, when the report is shown, printed or designed, it has that specific culture. Keep in mind that at report.RegData, the database is hit, and the culture will be set to en-US!
I hope you understand this problem.
Regards,
René
Culture of Report
Hi Edward,
Don't bother this problem anymore. We have solved it with a workaround.
Regards,
René
Don't bother this problem anymore. We have solved it with a workaround.
Regards,
René

Culture of Report
Hi René,
Thank you for this information.
Good luck!
Let us know if we can help you somehow.
Thank you.
Thank you for this information.
Good luck!

Let us know if we can help you somehow.
Thank you.