0
votes

I am trying to hide all rows in SSRS except for where the buyer field = 'FCF'. I am using multiple datasets in this report so I use the below expression to try and hide/show the data:

=Lookup(TRIM(Fields!PRODUCT_CODE.Value), 
TRIM(Fields!item.Value), Fields!buyer.Value, "Visual") = "FCF"

This expression goes into the visibility section(right click row>Row Visibility>Show or hide based on an expression). When I run the report with this enabled it will not return any values at all even though it should return multiple rows of data. Below is an example of on the output I get when I remove the expression from the report:

Slot     Item  Item Description              Qty  UOM  Exp Date  Buyer
35863A  32052 FCF BROCCOLI SALAD KIT 2.125#   3   CS  12/28/2017 FCF     
1
FIrst thing to do is add a column in your report that shows the results of your expression. I would guess that the expression is not returning what you expect. Once you see the results it might be easier to debug.Alan Schofield
It is in there, see the edit to the original post.IowaMatt
What is the expression you are using to get the value of your column Buyer in your Tablix/Matrix?Larnu
I use an expression that is very similar =Lookup(TRIM(Fields!PRODUCT_CODE.Value), TRIM(Fields!item.Value), Fields!buyer.Value, "Visual")IowaMatt
try lookup with iif condition : iif(Lookup(TRIM(Fields!PRODUCT_CODE.Value), TRIM(Fields!item.Value), Fields!buyer.Value, "Visual") = "FCF"),false,true)Nikhil Shetkar

1 Answers

0
votes

Found the issue. I feel stupid but the buyer field had a space in it. I changed the expression to 'LIKE' and it fixed. Thanks for the help everyone!

=IIF(Lookup(TRIM(Fields!PRODUCT_CODE.Value), TRIM(Fields!item.Value),Fields!buyer.Value, "Visual") LIKE "*FCF*",FALSE,TRUE)