Page 1 of 2

Thousand separator . and not ,

Posted: Tue Feb 21, 2023 1:21 pm
by _Andy!
Following format function gives a , as result for the thousand separator in English Language.

Code: Select all

Format("{0:N2}",Result.OrderLineSL_Price)
Example:
Actual situation: 1,017.50 €
Target situation: 1.017,50 €

I can´t use the standard functionalities of the Stimulsoft Report Designer, because the decimal places will be export in serveral variants from my ERP system.
I have to use the format functions. Do you have an overview over all possibilites (help page) ? Thank you for your support.

Re: Thousand separator . and not ,

Posted: Wed Feb 22, 2023 9:45 pm
by Lech Kulikowski

Re: Thousand separator . and not ,

Posted: Wed Mar 01, 2023 4:08 pm
by _Andy!
Ok, thank you for the links. But that doesn´t solve my problem. Can you give me an overview for the Format functions?
What´s the right format function for this use case?

Re: Thousand separator . and not ,

Posted: Wed Mar 01, 2023 7:21 pm
by Lech Kulikowski
Hello,

You can find information about the format function at the following link:
https://learn.microsoft.com/en-us/dotne ... ew=net-7.0
https://learn.microsoft.com/en-us/dotne ... at-strings

Thank you.

Re: Thousand separator . and not ,

Posted: Wed Mar 15, 2023 3:00 pm
by _Andy!
I don´t find a function which solves my problem:

Code: Select all

Format("{0:N2}",Result.OrderLineSL_Price)
I tried several formulas.
Target situation: 1.017,50 €

Target:
no change if the culture will be changed from DE to US for example.
Thousand separator and decimal separator won´t be changed.

Can you help me ? Thank you.

Re: Thousand separator . and not ,

Posted: Thu Mar 16, 2023 7:12 pm
by Lech Kulikowski
Hello,

Please try to use:
{String.Format(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"),"{0:N2}",Variable1)}
or
{Replace(Format("{0:N2}",Variable1), ",", ".")}

Thank you.

Re: Thousand separator . and not ,

Posted: Fri Mar 17, 2023 8:25 am
by _Andy!
The result with {Replace(Format("{0:N2}",Variable1), ",", ".")} is 48.220.00.
My Target is to show 48.220,00

{String.Format(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"),"{0:N2}",Variable1)} gives an error message. (see screenshot1 in attachment.)

Do you have another suggestions?

Re: Thousand separator . and not ,

Posted: Tue Mar 21, 2023 1:15 pm
by Lech Kulikowski
Hello,

There are no other standard ways to change it.
As a way, you can add your own function in which set format as you need.

Thank you.

Re: Thousand separator . and not ,

Posted: Tue Mar 21, 2023 2:54 pm
by _Andy!
Hello @Lech Kulikowski,
which function is that?
I tried several functions. The thousand separator will be changed in every case. That has to be possible in my opinion. I don´t know what else can i try.

Re: Thousand separator . and not ,

Posted: Thu Mar 23, 2023 8:42 am
by Lech Kulikowski
Hello,

> which function is that?

We mean, you can implement your OWN function and add to the dictionary, which will format your values as you need.

Thank you.