Andy Jensen
Andy Jensen

Reputation: 93

SSRS One to Many Join/Lookup DataSet

In SSRS I am trying to create a table or matrix using two datasets that have a one-to-many relationship. The table/matrix needs to be tied to the one relationship and join to the many.

I initially tried to do a lookup function, but that is a one-to-one relationship and just returned one value. I'm looking to return all values and each one on a separate row. Here is an example of two datasets, I want to join on the CustomerID column and return the CountriesOfBusiness column. Is there a different function in SSRS that will do this?

Dataset1 - This is what is

enter image description here

enter image description here

Upvotes: 0

Views: 1142

Answers (1)

SuperSimmer 44
SuperSimmer 44

Reputation: 999

Try this expression in table/matrix: (set Dataset name to be: DataSet1)

=Join(LookupSet(Fields!CustomerID.Value, Fields!CustomerID.Value, Fields!Countries.Value, "DataSet2"), VbCrlf)

Upvotes: 1

Related Questions