Sandsower
Sandsower

Reputation: 23

Truncating numerical value in report view

I'm looking for a way to truncate numerical values to up to 2 decimals in a report view (RDLC) in C# 3.0. There's a function for rounding but there isn't a direct one for truncating inside the report. Is there any way to do it inside the report, or does it have to be done before sending the data? Thanks for the help in advance.

Upvotes: 2

Views: 2503

Answers (1)

Jamie F
Jamie F

Reputation: 23789

Set the expression for the cell or placeholder to use the Floor function:

=Floor(Fields!MyField.Value * 100.0) / 100.0

Upvotes: 4

Related Questions