IIF runs two parts

3 posts, 0 answers
  1. Anders
    Anders avatar
    6 posts
    Member since:
    Apr 2019

    Posted 16 Sep 2019 Link to this post

    telerik report designer : 13.1.19.618

    When I use IIF as = IIF(1 > 0, 1, 0/ 1) , it throws exception Attempted to devide by zero. I think it is a bug.

  2. Anders
    Anders avatar
    6 posts
    Member since:
    Apr 2019

    Posted 16 Sep 2019 Link to this post

    The expression is IIF as = IIF(1 > 0, 1, 1/0 ). 

     

    ps : There is no way to edit the thread.

  3. Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 16 Sep 2019 Link to this post

    Hi Anders,

    When you use the IIf built-in function, both sides of the expression are evaluated during the processing. To avoid issues if one of the sides contains division by zero, I can suggest using ?: conditional operator instead.

    Best Regards,
    Silviya
    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