I am using SSRS 2008 to create a report. Is it possible to create a report from multiple data sources?
Thanks.
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.
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.
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.
If you are referring to a paginated RDL report, yes. You would need to use cascading parameters, bound to different datasets.
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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With