Incorrect value in Sum Footer

2 posts, 0 answers
  1. Victor
    Victor  avatar
    1 posts
    Member since:
    Jul 2014

    Posted 06 Feb 2019 Link to this post

    Hi, I have a simple report where I make a Sum in the footer that summarizes depending of the invoice date. I have only one record with a value of 120.01 but the Sum of that record displays 120.00 in the footer. The format I am using is Numeric with 2 decimals and the field coming from the DB is a decimal, the other formulas are correct. Any idea ?

    The attached file shows the generated report.

    Thanks a lot !

  2. Neli
    Neli avatar
    365 posts

    Posted 08 Feb 2019 Link to this post

    Hello Victor,

    When you use the Sum Aggregate function, it acquires the Type of the first number added to the total. For example, if the first number is 0 (which will be accepted as an Integer), all next addends will be converted to Integer. That's why the field with the total Sum will be calculated and represented as an Integer.
    Note that the Sum will be calculated first (i.e. as Integer) and then the TextBox where the result is displayed will be formatted with the provided Format, hence the value will look as if *not* correctly calculated.

    The right Expression in your case should be as follows :


    The explicit 0.0 assures that the hard-coded value will be taken as a float/double.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top