How to compare two string columns in SSRS?

  • Hi Team,

    I have a requirement to compare two string columns in SSRS and provide the result as an expression in the reports.

    Requirement is

    If column A = Column B then display column A { Column B } else display only column A

    I have tried this with no luck

    =IIF TRIM((Fields!Column A.Value)= TRIM (Fields!Column B.Value),Fields!Column A.Value + " { " + Fields!Column B.Value + " } " , Fields!Column A.Value)

    Could some one please post me the script for this requirement.

    Thanks

    Krishna.

  • Hi,

    If you change + to & this should work. & is used in ssrs expressions for combining strings

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

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