Sruthi Suresh
Sruthi Suresh

Reputation: 697

How do I round to the nearest 0.5 in RDLC

I have to round values in my RDLC expression.

If the decimal part is greater than .50 I need to add 1 to the value. If the decimal part is less than .50 I need only the value.

Examples:

Upvotes: 0

Views: 1272

Answers (2)

Rupesh
Rupesh

Reputation: 342

While designing RDLC, in the expression editor, select common functions > Math > Round function

Upvotes: 1

mybirthname
mybirthname

Reputation: 18127

double yourNumber= 14.42;    
Math.Round(yourNumber, 0, MidpointRounding.AwayFromZero)

Upvotes: 1

Related Questions