Divide by zero not working


  • Hi,

    I have two rows, one for detail numbers and one row above like group , where are totals. I have two columns Sell in year N and Sell in year N minus 1. Numbers are grouped on week level.

    I want to make division of those numbers (sense of number is not important now) at the group level = division of sums of those numbers.

    If I do my expression without division operation, then its working perfectly

    =IIF(IsNothing(SUM(Fields!SellNMinus1.Value)) or SUM(Fields!SellNMinus1.Value)=0,"Do not divide", "Divide")

    After report is generated then I really see "Do not divide" for all weeks, where SellNMinus1 is 0 or null.

    If I exchange expression by

    =IIF(IsNothing(SUM(Fields!SellNMinus1.Value)) or SUM(Fields!SellNMinus1.Value)=0,"Do not divide",

    Then it shows #Error in fields, where SellNMinus1 is 0 or null and in BIDS I see message

    Warning    1    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘Textbox4.Paragraphs[0].TextRuns[0]’ contains an error: Attempted to divide by zero.    F:\Ewals\Lori reports 2013\Lori reports 2013\NEWBranch results.rdl

    I am lost, whats wrong ?


    Saturday, October 26, 2013 12:05 PM


All replies