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

Using CDbl function with different regions

2 Answers 280 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Rajika
Top achievements
Rank 1
Rajika asked on 16 Nov 2018, 11:31 AM
Hi,

We have identified that CDbl function work as intended only when the data (number) is according to the format of the machine region.

eg: If a number is 33165,25 Norwegian region, CDbl will work only if the machine region is set to Norway, otherwise it will throw an error.

Is there any workaround for a scenario where we need to use data formatted according to a different region setting compared to the machine region.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 21 Nov 2018, 09:22 AM
Hello Rajika,

In general, reports are processed and rendered with the current thread's culture e.g. In VS it is English by default (VS settings), and with the Standalone Report Designer tool it will be the machine's culture settings.
I'm not sure where it is failing with an error. Is it in when previewing the report from the designer or in an application?

In report designer, 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. For more information, please check the Report Globalization help article.

When you run the report from an application, you can set the current thread's culture which will cause the reporting engine to use these culture settings for conversion like decimal and group delimiters. Setting the culture in a web application can be done on request e.g.  Localization in ASP.NET MVC 4.

Regards,
Silviya
Progress 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
0
Rajika
Top achievements
Rank 1
answered on 21 Nov 2018, 11:07 AM
Hi Silviya,

We solved the problem by setting the culture of the current thread at the start of the application as you have mentioned.

Thank you.
Regards,
Rajika
Tags
Report Designer (standalone)
Asked by
Rajika
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Rajika
Top achievements
Rank 1
Share this question
or