Unplanned
Last Updated: 28 Jun 2021 08:40 by ADMIN
Catalin
Created on: 25 Jun 2021 08:50
Type: Bug Report
1
Formatting the numbers does not respect the NumberFormatInfo of the Report.Culture property

My need is to format numbers according to a custom culture with custom decimal, group symbols and number of decimal digits. For this I've created a custom CultureInfo object and set it up on Report.Culture property in a IReportSourceResolver implementation - I am using ASP.NET  from .net 5 example. For some reason, most of the NumberFormatInfo properties are ignored and a default, specific to the underlying culture code, is used. 

I need to programmatically change the NumberFormatInfo, because the service that is using Telerik Reporting is working in a multi tenant / multi culture environment and it must use the same report template but with different cultures for different requests.

Current result:

123 456 789
123 456 789,012
123 456 789 €
123 456 789,01 € 

Desired result, as per NumberFormatInfo settings (seen also in console):

123#456#789

123#456#789*01235

123##456##789 E

123##456##789**012346 E

 

Documentation reference:

https://docs.telerik.com/reporting/designing-reports-report-globalization

"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 Report.Culture property. This will force all Telerik.Reporting.TextBox items to respect the assigned Culture." 

But this does not appear to fully work. NumberFormatInfo of the Report.Culture property is not considered.

I've attached a project that reproduces this issues.

0 comments