Report Globalization Overview
Telerik Reporting offers the possibility to control the way numbers, dates, and currencies are displayed and to layout text in different directions.
A report is globalized with the help of a System.Globalization.CultureInfo object. You can specify a Culture for the entire Telerik.Reporting.Report by setting its Telerik.Reporting.Report.Culture property. This will force all Telerik.Reporting.TextBox items to respect the assigned Culture. But you are not limited by one culture per report. You can mix an unlimited number of cultures, by setting the Telerik.Reporting.TextItemBase.Culture property of a specific Telerik.Reporting.TextBox. This will override the Report's Culture.
Culture Inheritance
When determining what Culture to use for formatting strings and text direction, the rendering engine will inspect those objects in the following order:
- The Culture of the TextBox.
- If the TextBox has no Culture defined, the Culture of the Report is used.
- If the Report has no Culture defined, the Culture of the CurrentThread is used.
The Culture of the CurrentThread is determined by the Regional Settings of the machine the application is running on. (Control Panel->Regional Settings->Regional Options->Standards And Formats)
Culture Dependant Properties
- String Formatting
Culture affects the way strings are formatted in Telerik Reporting. For example, if you set the British Culture (en-GB) for a TextBox and set it Telerik.Reporting.Processing.TextItemBase.Format to Currency ({0:C2}) you will see values like £43.21
. The same applies to dates, times, and numbers.
- Text Direction (LTR/RTL)
Middle Eastern languages such as Hebrew and Arabic are generally written from right to left. If your TextBox will contain text written using an RTL script, then you simply need to specify the appropriate Culture, for example, "he" for Hebrew and "ar" for Arabic.
As of Q3 2024 (18.2.24.806) culture properties, such as the CurrencyNegativePattern property, are resolved based on the machine's local settings instead of the default globalization settings of the current culture.
See Also
- HTML5 Report Viewer Localization
- Angular Report Viewer Localization
- React Report Viewer Localization
- HTML5 ASP.NET MVC Report Viewer Localization
- HTML5 ASP.NET Web Forms Report Viewer Localization
- Windows Forms Report Viewer Localization
- WPF Report Viewer Localization
- (legacy) ASP.NET Web Forms Report Viewer Localization