Nan,#Error,Infinity Values displaying in ssrs reports

  • When I use calculation in generating reports, I get Nan,#Error,Infinity values in preview , I wanted to avoid this and display " " if the result of calculation is null or infinity..

    Please let me know how to avoid "NaN" and "infinity" and "#Error", while displaying in reports.

    when ever i see the prview NAN values are displayed and remaining fields are shows appropriate query results like percentage values Like 98%.00 some thing but i have a problem with "NaN" and "infinity" and "#Error" values i need to change those "NaN" and "infinity" and "#Error" values to " "

  • battula.ramu6 (2/6/2014)


    When I use calculation in generating reports, I get Nan,#Error,Infinity values in preview , I wanted to avoid this and display " " if the result of calculation is null or infinity..

    Please let me know how to avoid "NaN" and "infinity" and "#Error", while displaying in reports.

    when ever i see the prview NAN values are displayed and remaining fields are shows appropriate query results like percentage values Like 98%.00 some thing but i have a problem with "NaN" and "infinity" and "#Error" values i need to change those "NaN" and "infinity" and "#Error" values to " "

    Use IsNull(value,'') to handle NULLs.

    'Infinity' is not defined (or returned) in T-SQL - can you give an example of a calculation that returns this result?

    If you are looking for a pure SSRS solution (rather than T-SQL), you might do better if you post in one of the dedicated Reporting Services forums.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • In percentage calculations, often you get these errors showing because of divide by zero/null issues. Adding expressions like the following can take care of it (vary depending on what your percentage calculation is).

    for null:

    =IIF(Fields!Denominator.Value Is Nothing, "", (Fields!Numerator.Value - Fields!Denominator.Value) / Fields!Denominator.Value)

    For zero:

    =IIF(Fields!Denominator.Value = 0, "", (Fields!Numerator.Value - Fields!Denominator.Value) / Fields!Denominator.Value)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply