Reza Owliaei
Reza Owliaei

Reputation: 3363

How to remove the decimal part from a float number that contains .000 in RDLC

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?

Example

how can I do this in an expression of RDLC?

Upvotes: 2

Views: 6255

Answers (3)

Serhii Kyslyi
Serhii Kyslyi

Reputation: 1823

You could use conversion

 CDbl(Fields!<<Field>>.Value)

Upvotes: 1

user3007071
user3007071

Reputation: 21

Hope this helps

=FormatNumber(field,NoOfDigitsAfterDecimal)

http://msdn.microsoft.com/en-us/library/xfta99yt(v=vs.90).aspx

Upvotes: 0

NoviceProgrammer
NoviceProgrammer

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

Related Questions