Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS multiple data sources

I am using SSRS 2008 to create a report. Is it possible to create a report from multiple data sources?

Thanks.

like image 523
Tony Avatar asked Mar 23 '11 20:03

Tony


People also ask

Can SSRS connect to multiple data sources?

Yes, you can use multiple Data Sources. Although you can't join the data. For instance, you can't have a table with fields from both Data Sources. BUT you can have a Data Source from Oracle and a Data Source from MS SQL.

Can you list a few data sources used in SSRS?

Reporting Services installs the following data source types: Microsoft SQL Server. Microsoft SQL Server Analysis Services for MDX, DMX, Microsoft Power Pivot, and tabular models. Microsoft Azure SQL Database.

What is difference between shared data source and shared dataset in SSRS?

A data source contains details about the database server you will be connecting to, the login to use and the database to use. A dataset contains the specific query that will be used to fetch data for a particular report. 1. In the Solution Explorer, right-click on Shared Data Sources and select Add New Data Source.

Can a parameter be referenced in multiple datasets in SSRS?

If you are referring to a paginated RDL report, yes. You would need to use cascading parameters, bound to different datasets.


3 Answers

With SQL Server Reporting Services 2008 R2 you can use the lookup functions to lookup a piece of data from a second dataset: http://blog.datainspirations.com/2010/03/19/sql-server-2008-r2-reporting-services-look-up-look-down-look-all-around-part-i/ Very handy.

From older versions of SSRS, you can create a subreport that occupies a cell in a table: the subreport can be called with a different parameter for every row, effectively "joining" to the second dataset. http://technet.microsoft.com/en-us/library/ms160348.aspx

like image 145
Jamie F Avatar answered Oct 22 '22 04:10

Jamie F


Yes, you can use multiple Data Sources. Although you can't join the data. For instance, you can't have a table with fields from both Data Sources. BUT you can have a Data Source from Oracle and a Data Source from MS SQL. You can use a List to group things together.

Generally, you'll want to use linked servers if you can and do the work in your query.

like image 26
SQLMason Avatar answered Oct 22 '22 03:10

SQLMason


You can present data from multiple data sources in a single report, merging datasets from different sources however, is not possible, unless you use some technique to merge this data from the database side, i.e. using a stored procedure. Also if your stored procedure returns multiple result sets, you have to do things like adding them into a table and returning the combined data as a single result, its not terribly difficult, but to your originally stated question, you can use multiple data sources in a report quite easily.

like image 42
Ta01 Avatar answered Oct 22 '22 04:10

Ta01