How to change decimal point character in LINQ Reporting Engine Template

Hey,

I have the following tag in Word template which is using Aspose.Words LINQ.

<<[TotalPrice]:” ##0.00”>> 

The output of the tag is the following: 10 200.00

My question is, is it possible to modify the tag above so that the output would have comma as a decimal separator, like this: 10 200,00?

Thank you!

@Suikero

The engine formats numbers and date-time values depending on CultureInfo.CurrentCulture. You can set its value accordingly before building a report as follows:

CultureInfo.CurrentCulture = new CultureInfo("fr-CA");

Hey,

So that needs to happen on a code-level? So no possibility for a template syntax solution if I understand correctly?

@Suikero

Yes, you are right. It is possible to override built-in formatting by using a custom type (see Setting up Known External Types for details), but it still requires to modify your code.

Okay, thank you very much

1 Like