Checking for 0 gives no value in the Totals row

  • I have a report in which Iam checking for 0 in the detail row ,as follows ( there are some NULLS in the DB, that's why Iam checking for ISNOTHING)

    IIF( Fields!Sales.Value IsNothing or Fields!Sales.Value = 0 , "0", Fields!Sales.Value)

    In the Total row if I say Fields!TotalSales.Value it not giving me any value if all the sales are 0.

    Eg : 0

    0

    0

    0----- It not giving me any value .It shows a blank cell.

    But if the sales are like,

    12

    10

    0

    5

    It gives me total as ---27 ,which was supposed to be.

    Can any one helpme out with this.

  • Try converting your IIF result to an integer (or anything numeric i.e. CDbl, CDec, etc.) like this:

    =CInt(IIF( Fields!Sales.Value IsNothing or Fields!Sales.Value = 0 , "0", Fields!Sales.Value))

    HTH

    [font="Comic Sans MS"]toolman[/font]
    [font="Arial Narrow"]Numbers 6:24-26[/font]

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

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