IIF Statement in Report Builder

  • Hi All,

    I am trying to get a formula to work at the foot of a report i have created in report builder using a data set from a stored procedure on SSMS 08.

    All it needs to do is sum an amount if a certain word appears in the row, i have tried to use an IIF statement however when i run the report it is summing the whole report instead of jus the selected rows.

    This is what i have tried

    =(IIF(Fields!Payment_To.Value ="CSL",Sum(Fields!PayAm.Value),0.00))

    Any help would be much appreciated

    Matt

  • You can do this in your core SQL by add a new field to your Sql

    Case when Payment_To ="CSL" THEN PayAm END AS Payment_To_Value_CSL

    Then just sum the field on your report

  • Didn't think of that, nice one thanks.

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

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