1

I am trying to make a new ssrs report: There is a details group that prints lines from datasource detailsDS. I also want to make a textbox in the footer(or anywhere, doesn't matter) where if there was any(or more than one) line in detailDS with value that equals "Red" that textbox should be set invisible.

I already tried: iif(first(Fields!Color.Value, "detailsDS") = "Red", True, false)

of course this doesn't work because it only searches for first record and textbox is out of scope of details.

Is it possible to solve this in report layer?

EDIT:

Seems like lookup function is not supported for ms dynamics.

zygbie
  • 11
  • 3

1 Answers1

1

As B.Seberie noted, you could use the lookup function.

=IIF(Lookup("Red", Fields!Color.Value, Fields!Color.Value, "detailsDS") = "Red", True, False)

You would want to use your static value of "Red" for the first argument. This is the value that will be searched for.

The second argument is for the field in the dataset that you want to check for the first argument's (Arg1) value.

The third argument (Arg3) is the field to return when it finds Arg1 in Arg2 - in this case you can just use the same color field. If the color is found, it will be TRUE otherwise it will be FALSE.

Hannover Fist
  • 10,393
  • 1
  • 18
  • 39
  • i am getting error Lookup is invalid. InvalidIdentifier – zygbie Sep 11 '19 at 07:00
  • @zygbie did you ever get this to work. I have a similar issue (on a TextBox thus no Scope) - I am pulling a different field as opposed to the lookup field, but my output says "#Error" - nothing more. – Grandizer Oct 28 '21 at 19:26