Number format

I have this code in the field. I have change the properties to number - 2 decimal but still get 4 decimals. Any help to format this to 2 decimals
=iif((UCase(Fields!KitPricing.Value) = “C” AND Boolean.Parse(Fields!KitPrintCompsInv.Value)), “”, FormatNumber(Fields!DocUnitPrice.Value, First(Fields!DecimalsPrice.Value, “RptParameter”) ) )

That will return a string, and uses First(Fields!DecimalsPrice.Value, "RptParameter") to determine the number of decimals.

So it looks like this report has the number of decimals to display, passed to it via that DecimalsPrice field.

Try changing the whole formula to

=iif((UCase(Fields!KitPricing.Value) = "C" AND Boolean.Parse(Fields!KitPrintCompsInv.Value)), "", FormatNumber(Fields!DocUnitPrice.Value, 2 ) )
1 Like

Hey Thanks! You are the best!