SSRS multiple data sources - sql-server

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

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.

Related

Connect Crystal Report to multiple Databases

Is there a way to connect a crystal report to multiple databases?
My database (SQL Server) is periodically archived and sometimes, I need to access data from an older "partition"/archive, let's call them DB109 and DB110. I need to produce one report with data from both DB109 and DB110. They have the same structure, same query, etc.
Is there a way to run the report for both DBs without running them separately and ending up with multiple files?
It seems like you could probably make two subreports, with one linking to one db and the other linking to the second. Add a parameter on whether to run the first, second, or both. And then conditionally display the subreports based on the parameter.
A second option would be to have a linked server in your main database to your archive database, and then write a procedure that pulls from both (perhaps also based on a parameter). Then use that procedure as your Crystal source.

SSIS Get Columns of Two Different SharePoint Lists

I'm trying to get two columns but each one of them are in differents SharePoint Lists.
Is it possible to get these columns and put it into a single destination? I'll need to use both later.
Thanks in advance.
Assuming you can use SSIS this article gives detailed instructions on how to get information from a sharepoint list. Once you have set up the sharepoint data sources to get the single column from the lists. Then point the data flow out to a Union All component, this will allow you to combine the two desperate data flows into on data flow (see attached picture). Then you can connect the single data flow to data destination, in the case of the picture it is a SQL server table.
If you do not have access to SSIS it is possible to do extract the data directly from the SQL tables if you have access to the sharepoint database. Not an approach that l would recommend.

Best Practise: presenting some data (making a report) from SQL Server

I have many SQL Server databases, each with a few tables containing important (from my point of view) information. I check the data (retrieving for example maximum or minimum value) within those tables using T-SQL queries.
Since I don't want to create views for each of the databases, I'm thinking about most convenient, easier and simply the best way to prepare summary which will be updating each time when opened.
The output file (or web page) will be used internally within technical team. All members can log into database using Windows authentication.
My idea was:
Excel + dynamic T-SQL --> I want to connect to database and execute T-SQL (cursor will go through all database names)
PowerShell (showing table using Out-GridView cmdlet)
PHP - first I will ask about all database names (executing select name fromsys.databases` and then execute query for each DB)
What is in your opinion best way? Do you have any better (from programmers point of view) way of getting such report/data?
You can use SSRS Reports .You have the options of exporting the report data to several formats such as pdf ,excel ,word .You can create a dataset for all your database .Since you are interested in showing aggregation and summation of values ,SSRS reports will be pretty useful in these cases .

Can I "join" across datasources in SSRS?

I've got two datasources, one Oracle and one Sql Server. Due to circumstances that predate me (as in it was like this when I found it) some columns in the Oracle database contain PKs from lookup tables in the Sql Server database.
I am attempting to create a Sql Server Reporting Services report that will combine data from both the Oracle and Sql Server database; where the data to be reported is partially from Oracle but some of the values needs to be looked up in Sql Server.
I've got the datasources. I've got the DataSets. I just can't figure out how to show both datasets in the same tabular report.
Is this possible? If so how so? I'd rather not resort to a db link in one or the other databases as I'd like to handle this on the reporting side.
I don't think you can join directly, but you might be able to add a subreport that would query the second datasource by using the foreign key from the first datasource as a parameter. See: How to: Add a Subreport and Parameters (Reporting Services).
You could also try using the Lookup and Lookupset functions within your tablix.
Lookup is a 1 to 1 join while Lookupset is 1 to many and may need you to have your data concatenated if you want a set of strings out.
For Lookup the following is from the MSDN site with some tweaks for my simple mind
Lookup(Field you are joining from, Field you are joining to, Field you want back, Dataset of the field you want back)
The tablix should be linked to the dataset of your source (joining from).
And just realised this is from 2010, not 2014...so a necro-post!
you could also embed a table inside another table and pass the primary key to the embeded table.
You could create a linked server that would contain data from both instances. From the SSRS point of view you would have one single datasource.
You can use heterogenous services or oracle transparent gateway to run the report off the oracle side. Oracle can query the data from the SQL side.

Which is faster for SSIS, a View on a table or a Conditional Split?

I have an SSIS project where one of the steps involves populating a SQL Server table from an Oracle Table.
The Oracle table has a column ssis_control_flag. I want to pull across all records that have this field set to 'T'.
Now, I was wondering which would be the best way of doing this, and the two options as I have detailed in the question presented themselves.
So really, I am wondering which would be faster/better. Should I create a conditional split in the SSIS package that filters off all the records I want? Or should I create a view in Oracle that selects the records based on the criteria, and utilise that view as the data source in SSIS?
Or is there an even better way of doing this? You help would be much appreciated!
Thanks
Why don't you use a WHERE clause to filter the records, instead of creating a view? May be I am not getting your question correctly.
Then in general, bringing all the data to SSIS and then filtering out is not recommended. Especially when you can do the filtering at the source DB end itself. Consider the network bandwidth costs as well.
Then this particular filter that you are talking about here, cannot be done with a better efficiency in SSIS than that can be done at DB. Hence better do it in the Oracle DB itself.
You can use a query using openrowset as the source for the dataflow instead of directly accessing the Oracle table.

Resources