Reputation: 3363
I have a RDLC, contains a column weight, to show a float number. If there's any decimal part, I have to show it. If there's no decimal part, I shouldn't show x.000000
What do you suggest to do so?
the number is 10.000001 then, I have to show the exact number, 10.000001
the number is 10.000000 then, I have to show 10
the number is 10.001000 then, I have to show 10.001
how can I do this in an expression of RDLC?
Upvotes: 2
Views: 6255
Reputation: 21
Hope this helps
=FormatNumber(field,NoOfDigitsAfterDecimal)
http://msdn.microsoft.com/en-us/library/xfta99yt(v=vs.90).aspx
Upvotes: 0
Reputation: 3365
have you already tried this -
=Format(Fields!<<Field>>.Value, "#.########")
"#" will display the value if present.
You can also try
=Format(Fields!<<Field>>.Value, "D")
Also check - http://msdn.microsoft.com/en-us/library/ms252080%28VS.80%29.aspx
Upvotes: 4