Vikas Kunte
Vikas Kunte

Reputation: 731

Include or Remove decimal part in SSRS field

I have a numeric field in SSRS report. Currently, the properties of this field are set to show 2 decimal places.

I need to make a change to remove decimal points if the value is a whole number.

Ex: if the number is 12.31, the output on SSRS field should be 12.31

If the number is 12.00, the output on SSRS field should be 12

Can anyone please help how this can be done? Expressions or Field properties?

Upvotes: 1

Views: 942

Answers (1)

tomdemaine
tomdemaine

Reputation: 758

You can use a SWITCH function on your data to get it into the preferred format.In the number section of the properties of your textbox (tablix cell etc)

properties

=switch( {your field}.value mod 1 = 0 , 0,
         {your field}.value mod 1 <> 0, 0.00)

Upvotes: 2

Related Questions