Search code examples
sql-serverreporting-servicesssrs-2008

IIf condition to check Tablix is present or not


I need to display an image if Name contains a "," in it e.g. (Annie, Peter) - then display image. Based on that my image will be visible or not. I used a condition like

=IIf(Fields!Names.Value Like "*,*", false, true))

Which says if the name contains "," then show my image else hide image. this doesn't work as expected.


Solution

  • Please try this.

    SELECT IIf(' Annie, Peter' Like '%,%', 0, 1)
    

    Your example below

    =IIf(Fields!Names.Value Like '%,%', 0, 1))