user3004110
user3004110

Reputation: 969

How to round decimal value in rdlc reports

I using a simple formula in rdlc report. I want to use the forward rounding for example i have value 25.17 and i want to convert into 26 not 25. But following formula giving me the result = 25.

=ROUND(Sum(Fields!Total.Value, "DataSet1") + First(Fields!Shipping.Value, "DataSet1") - First(Fields!Discount.Value, "DataSet1"),0)

Thanks in advance

Upvotes: 0

Views: 11862

Answers (2)

tezzo
tezzo

Reputation: 11105

In your Expression, use Ceiling function instead of Round.

=Ceiling(Sum(Fields!Total.Value, "DataSet1") + First(Fields!Shipping.Value, "DataSet1") - First(Fields!Discount.Value, "DataSet1"))

Upvotes: 2

Andreas Kruhlmann
Andreas Kruhlmann

Reputation: 161

Most programming languages have a Round, Floor and Ceiling function. Floor rounds down, ceiling up and round to the nearest.

Further reading for the ceiling function https://msdn.microsoft.com/en-us/library/system.math.ceiling%28v=vs.110%29.aspx

Upvotes: 0

Related Questions