Text format 'number' shows decimal digits inappropriate

Stimulsoft Reports.PHP discussion
Post Reply
onazifi
Posts: 6
Joined: Tue Sep 01, 2015 7:43 am

Text format 'number' shows decimal digits inappropriate

Post by onazifi »

Hello,

In my report I wanna show a number with decimal digits.

But, in stimulsoft report, when I select "text format" as "Number" and give decimal digits to 3, shows the number inappropriate.
For example If we have 121250.36 and set "text format" as "Number", active Use Group Separator, decimal digits equals 3, Group size equals 3. It will show 121250.360

How can I solve this problem?
Kindly suggest some solution for this.


Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text format 'number' shows decimal digits inappropriate

Post by HighAley »

Hello.

If you don't want to get extra zeros, please, use Custom Format with next mask:

Code: Select all

#.###
Thank you.
onazifi
Posts: 6
Joined: Tue Sep 01, 2015 7:43 am

Re: Text format 'number' shows decimal digits inappropriate

Post by onazifi »

Aleksey Andreyanov wrote:Hello.

If you don't want to get extra zeros, please, use Custom Format with next mask:

Code: Select all

#.###
Thank you.
Hi Aleksey,

Thank you for your response. I checked it and it was right.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text format 'number' shows decimal digits inappropriate

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
joaquinsuarez69
Posts: 4
Joined: Tue Feb 27, 2018 5:23 pm

Re: Text format 'number' shows decimal digits inappropriate

Post by joaquinsuarez69 »

Hi, related to this topic, i have a number with several decimal digits but i dont want to see all of them in a report and i have a number in the data that says how many should be. how can i implement this ?
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Text format 'number' shows decimal digits inappropriate

Post by Lech Kulikowski »

Hello,

You can try to add your own function and use it in the text expression.

Thank you.
joaquinsuarez69
Posts: 4
Joined: Tue Feb 27, 2018 5:23 pm

Re: Text format 'number' shows decimal digits inappropriate

Post by joaquinsuarez69 »

HighAley wrote: Tue Sep 01, 2015 12:03 pm Hello.

If you don't want to get extra zeros, please, use Custom Format with next mask:

Code: Select all

#.###
Thank you.

thank you for your answer, using this as base im trying to do the following

Code: Select all

 ToString(MyValue,"#,###") 
and it works with the comma, but when i use the same expression but using the dot it doesn't works, the value that shows is 10000. while with comma 10,000 What could be the problem ?
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: Text format 'number' shows decimal digits inappropriate

Post by Lech Kulikowski »

Hello,

Please check the following article:
https://docs.microsoft.com/en-us/dotnet ... at-strings

Thank you.
Post Reply