Report function rounds number

2 posts, 0 answers
  1. Michael Gois
    Michael Gois avatar
    17 posts
    Member since:
    Oct 2008

    Posted 13 Dec 2009 Link to this post


    I have a textbox on my report, and I have set the Value of it to ""=Fields.break_mins / 10". I have also set the format of the textbox to {0:N2}. It performs the calculation as it should, but the number is always rounded. E.g. if break_mins is 104, then the result is printed as 10.00 rather than 10.40. I have tried changing the number format to {0:D2} as well but the result is still the same. Is there a way to get it to perform the division without rounding the number?

    Thanks in advance
  2. Steve
    Steve avatar
    10941 posts

    Posted 16 Dec 2009 Link to this post

    Hello Michael Gois,

    The division of two integers is also an int and therefore only the part before the delimiter is taken into account. Your expression should work with float values in order to return float values e.g.:

    =Fields.break_mins / 10.0

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top