I have got a report that consists of several matrices aligned right next to each other. Not all the cells of the report contain data and appear as blanck cells so i created the following statement in order to have "N/A" on all cells that have no value:
=IIf(isNothing(Fields!Belfast.Value),"N/A",Fields!Belfast.Value)
and what i need to do is to give all cells that have the "N/A" value to have a colour so i created this statement in the Text properties under the Fill Menu:
=IIf(Fields!Belfast.Value = "N/A","#faa1a1",Fields!Belfast.Value)
but when i preview the report no cells containoing "N/A" are changing colour according to my cell Fill statement.
what am i doing wrong?
There's no problem with your first expression. However, an expression like this will only change the value in the Report Item. The values in your dataset results will be unchanged, even in the context of the cell you've put the expression in.
One way to get the desired results is to use the same logic from your value expression in your colour expression:
=IIF(IsNothing(Fields!Belfast.Value), "#faa1a1", "Black")
Alternatively, you can check the Report Item value to use the value that would appear on-screen, after your first expression:
=IIF(ReportItems!txtBelfast.Value = "N/A", "#faa1a1", "Black")