Search code examples
reporting-servicesrdlcrdl

How to format a number cell in RDLC Report


I want to remove the decimal part of a number in a cell but when I set decimal seperator to "0", it also rounds the number. What I want is if my number is 3.99 I would like to see it 3 but it rounds it to 4. Is there a way to do it? Thanks


Solution

  • What you want is not to format the number, what you actually want is to round down the number :

    Math.Floor( 3.99 ) ' That gives 3
    

    Format always round the number to the nearest value, which means that 3.99 with a format '#' would give 4.