简体   繁体   中英

SSRS / BIDS - Comparing Fields in Multiple Datasets to get a Third Value

I am using BIDS 2008 to create SSRS reports.

I have two data sets (one is manually created, one from SQL Server) and I'm trying to retrieve a third value from one data set, where it to other fields match.

I've been trying to use a IIF statement but have had no luck.

Example below;

=IIF(Fields!Name.Value, "Dataset1" = Fields!Name.Value, "Dataset2",Fields!Age.Value, "Dataset2,"")

Hopefully someone can help, I'm rather stuck right now...

You want LookUp() by the looks of things. LookUp() matches data across datasets where there is a 1-1 relationship, like in the case of your Name fields matching...

=LookUp(Fields!Name.Value, Fields!Name.Value, Fields!Age.Value, "Dataset2")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM