Search code examples
reporting-servicesreportexpressionbuilderreportbuilder

displaying results in column based on code in other column


enter image description here

hello, i have a table with three columns (TEL, MOBILE, EMAIL) after the column "Contact Type". I'm trying to figure out how to show/hide the results in the 3 columns based on the code that is in the Contact Type field. for example if the contact type = MBL then the results would only show in the column labelled Mobile, if the code in contact type was "TEL" then only results would only display in the column labelled TEL. the other two columns would remain blank. the code for the last column is EML. can this be done as an expression?

thanks in advance for the help

regards


Solution

  • You can use an expression in each of the three columns. For example in the "Tel" column would be something like this.

    =IIF(Fields!ContactType.Value = "TEL", Fields!Tel.Value, "")
    

    You'll just need to replace the text string and field names in each column as required.