Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SSRS

Author  Topic 

eddiece
Starting Member

7 Posts

Posted - 2012-03-12 : 13:51:47
Does anyone know the best way to join fields from several tables onto a single report in SSRS 2005 and 2008????



Ed English

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-12 : 13:55:51
With a query that includes several joins? Doesn't matter if it's a report or not, get the query right first.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-12 : 15:09:13
quote:
Originally posted by eddiece

Does anyone know the best way to join fields from several tables onto a single report in SSRS 2005 and 2008????



Ed English


As Tara says, you need to design the backend query in such a way to pull the required tables after joining them on related fields. There's no other shortcut to it.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

eddiece
Starting Member

7 Posts

Posted - 2012-03-13 : 06:02:45
What if you need to join the tables from different databases which would mean different data sources?

Ed English
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-13 : 12:20:31
quote:
Originally posted by eddiece

What if you need to join the tables from different databases which would mean different data sources?

Ed English



You don't need different data sources for this. Just use the three part naming convention in the query for the other databases. If some are on a different server, then you could choose to use the four part naming convention via a linked server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-13 : 15:04:39
quote:
Originally posted by eddiece

What if you need to join the tables from different databases which would mean different data sources?

Ed English


you cant join data from multiple datasources inside report unless you're applying some aggregation. So you should do it in backend queries exactly as Tara suggested

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -