Iff Expression - Comparing fields and assign value in the same data set

  • I have these fields in the data set: Employee, Current Address, Previous Address;

    In the report, if the previous address is the same as the Current Address, I want to display

    blank instead of repeating the same info, is this the correct syntax to do this?

    =IIF(Fields!PreviousAddress.value = fields!CurrentAddress.value,” ”,Fields!PreviousAddress.Value)

  • That looks right to me. You might not need the space between the quotes for the blank:

    =IIF(Fields!PreviousAddress.value = fields!CurrentAddress.value,"",Fields!PreviousAddress.Value)

  • Wouldn't setting HideDuplicates property of the report field work in this case ?

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

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