Decimal Places

Stimulsoft Reports.WEB discussion
Post Reply
laducd
Posts: 115
Joined: Thu Oct 23, 2014 2:15 pm

Decimal Places

Post by laducd »

Hi

I have data with only 2 decimal places however on my report I would like it to display with 3 decimal places. The third decimal place I would like to be 0
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Decimal Places

Post by Edward »

Hi Labucd,

Please try the following expression:

Code: Select all

{String.Format("{0:0.000}", DataSourceName.DecimalValueColumn) }
Thank you,
Edward
laducd
Posts: 115
Joined: Thu Oct 23, 2014 2:15 pm

Re: Decimal Places

Post by laducd »

I am still getting 2. The data is only 2 decimals, I would just like to add the 0

{String.Format("{0:0.000}", cq1.Line_Foreign_Amount) }
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Decimal Places

Post by Edward »

Hi Laducd,

It maybe the case when the type of that cq1.Line_Foreign_Amount column is not a numeric/decimal but some other type. That would be an explanation on why that did not work. There is an easy way to check in the designer:
3DecimalPoints.PNG
3DecimalPoints.PNG (63.71 KiB) Viewed 4651 times
3DecimalPlaces.mrt
(14.05 KiB) Downloaded 233 times
Thank you,
Edward
laducd
Posts: 115
Joined: Thu Oct 23, 2014 2:15 pm

Re: Decimal Places

Post by laducd »

Ok I changed it to Decimal format, however I am now getting too many 0.


-12937.5000000000
laducd
Posts: 115
Joined: Thu Oct 23, 2014 2:15 pm

Re: Decimal Places

Post by laducd »

I figured it out, thanks for your help
Andrew
Posts: 4106
Joined: Fri Jun 09, 2006 3:58 am

Re: Decimal Places

Post by Andrew »

Okay, thank you for letting us know about this.
Post Reply