Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am new to SSRS and in one of the scenarios, I need to use Lookup function.
I have two datasets and I want to compare fields in these two datasets and get the ouput.
Let's say I have datasets ds1 and ds2. I am trying to match tag name from ds1 with itename from ds2 and get the value from ds2.
Below is my lookup function.
=Lookup(Fields!Tag_Name.Value, Fields!Itemname.Value, Fields!Value.Value, "ds2")

I get below error.
System.Web.Services.Protocols.SoapException: The Value expression for the text box ‘txtOpenTemp’ refers directly to the field ‘Tag_Name’ without specifying a dataset aggregate.  When the report contains multiple datasets, field references outside of a data region must be contained within aggregate functions which specify a dataset scope. 

My textbox is outside the data region and I guess because of that I am facing this issue.

What I have tried:

I could try for aggregate functions like
First(Fields!Tag_Name.Value)
but this will compare only first value always.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900