1
votes

I have an SSRS report with 2 datasets. dataset1 has a value called Party_Number and dataset2 has a value called Name.

I am pulling the name from a Lookup:

Lookup(Fields!MODIFIED_IPP.Value,Fields!IPP.Value,Fields!Trustee_Name.Value,"DataSet2")

However I want to hard code 2 values because the IPPs do not exist in dataset1.

For example I would like to say IIF the IPP in dataset1 equals 111 then use the name "Jane Doe" for Trustee_Name else use the above Lookup expression.

Is this possible?

1

1 Answers

1
votes

Try the following expression, it has multiple iif with lookups. The first two iif are hard coded to the values of 111 and 222, then a lookup and a blank default entry if nothing is detected.

Hope this helps some...

=IIF(Fields!MODIFIED_IPP.Value = "111", "Jane Doe",IIF(Fields!MODIFIED_IPP.Value = "222", "John Dex",
 IIF(len(Lookup(Fields!MODIFIED_IPP.Value, Fields!IPP.Value,  Fields!Trustee_Name.Value, "DataSet2")) > 0 , 
 Lookup(Fields!MODIFIED_IPP.Value, Fields!IPP.Value,  Fields!Trustee_Name.Value, "DataSet2") , "Blank default entry")))