Wednesday, March 28, 2012

Images in a table cell, conditional on a data item value

Phew!
I have a table, and in one cell I want to display an image. No big deal. However, I then want another image to be substituted for the original one, if a certain field value is false.

So the logic is,if field value is true, display image 1
if the same field value is false, display image no 2.

The expression I have written so far is:

-iif(Fields!Expr9.Value=False,"image1","image2")

where both image1 and image2 are images embedded into the report.

It shows the first image when the field value is false, but It isn't showing image 2 on lines where the field value is true.

Any takers?

What happens if you invert a condition, i.e.

=iif(Fields!Expr9.Value,"image2","image1")

No comments:

Post a Comment