Stephen L
Stephen L

Reputation: 351

How to Remove zeros after decimal points while using Round function in RDLC Reports?

I am Using RDLC Expression for rounding of my data to 4 decimals. but if i use 'Round' function it will show zeros after decimal point if the data has no decimal values.

Ex: If my value is 1 it shows 1.0000. How to remove zeros?

My Expression: =Round(CDec(Fields!ExchangeRate.Value),4)

I need number without decimal point as whole number, if it has decimal values then it should display with decimal values.

Thanks in Advance.

Upvotes: 2

Views: 6493

Answers (3)

Md Shahriar
Md Shahriar

Reputation: 2746

enter image description here

Simply try this...it works for me.

Upvotes: 2

Stephen L
Stephen L

Reputation: 351

=Format(CDec(Fields!ExchangeRate.Value),"#.####")

Above Expression Works fine. Thank You.

Upvotes: 7

Monah
Monah

Reputation: 6784

you can use the Format property of the textbox as

1- right click the textbox
2- click number
3- select Number from the category
4- set Decimal Places to 0

hope it will help you regards

Upvotes: 1

Related Questions