• Status: Solved
  • Priority: Medium
  • Security: Private
  • Views: 43
  • Last Modified:

Create a Report using Multiple Data Sets

I have two datasets from different sources one SQL, 1 Oracle)... dataset 1 has customer number and service ticket details,  dataset 2 has customer info like name, address, etc.

Is it possible to get the report to display information from dataset 1 & dataset 2 by matching on the customer number>

Customer #(from dataset 1)... Customer Name (from dataset2) ... Ticket(from dataset1) ....   etc
Rhonda Carroll
Rhonda Carroll
  • 3
1 Solution
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
If you are using SQL 2008 R2 or greater, you can use the Lookup function to return text from one table (i.e. customer name) on the same row as a tablix matching on the ID from joined tables (i.e. Customer Number).

=Lookup(Fields!Dataset2.Name, Fields!Dataset2.CustomerNumber, Fields!Dataset1.CustomerNumber, "data_source_dataset2")

Open in new window

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Keep in mind though if you're trying to join a SQL set to an Oracle set, that is dependant on CustomerNumber being the same data type and values, and that there's not a lot of problems with missing values in one set.  

If so, this would indicate the need to use an ETL tool like SSIS to import one set into the other, and then do some kind of data cleansing / handling blank values / whatever to make the data more presentable.   Then, you could just use a view in your data set and not have to deal with joining in SSRS.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now