Page 1 of 1

Decimal Places

Posted: Tue Jul 11, 2017 8:06 pm
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

Re: Decimal Places

Posted: Wed Jul 12, 2017 3:09 am
by Edward
Hi Labucd,

Please try the following expression:

Code: Select all

{String.Format("{0:0.000}", DataSourceName.DecimalValueColumn) }
Thank you,
Edward

Re: Decimal Places

Posted: Fri Jul 14, 2017 6:13 pm
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) }

Re: Decimal Places

Posted: Sun Jul 16, 2017 10:22 am
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 5931 times
3DecimalPlaces.mrt
(14.05 KiB) Downloaded 334 times
Thank you,
Edward

Re: Decimal Places

Posted: Tue Jul 25, 2017 4:26 pm
by laducd
Ok I changed it to Decimal format, however I am now getting too many 0.


-12937.5000000000

Re: Decimal Places

Posted: Tue Jul 25, 2017 4:43 pm
by laducd
I figured it out, thanks for your help

Re: Decimal Places

Posted: Wed Jul 26, 2017 4:55 am
by Andrew
Okay, thank you for letting us know about this.