Reporting Services usingIIF expression

  • I'm using reporting services and build a report with visual studio, on expression I put

    =IIf(Fields!Currency.Value="USD",Sum(Fields!TOTAL.Value),Nothing) meaning if found USD

    then sum the total field, works fine but I add another text box and change it to EUR

    =IIf(Fields!Currency.Value="EUR",Sum(Fields!TOTAL.Value),Nothing)

    and it didn't sum only sum for USD

    anybody know why?

    thanks

  • Try this

    =Sum(IIf(Fields!Currency.Value="USD",Fields!TOTAL.Value,Nothing)

    =Sum(IIf(Fields!Currency.Value="EUR",Fields!TOTAL.Value,Nothing)

  • works !!!!!!!!!!!!!!! THANK YOU !!!!!!!!!!!!!!!!!! 🙂

  • Welcome.

    I would recommend to post reporting services issue at following page.

    http://www.sqlservercentral.com/Forums/Forum150-1.aspx

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

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