SQL Server Reporting Services (SSRS) – How to union or join tables from different databases on the same server

This example applies to SSRS 2008

SELECT a.datafield1 As Col1, a.datafield2 As Col2, b.datafield6 As Col3
LEFT OUTER JOIN databaseB.dbo.Table4 b on b.datafield6 = a.datafield1
FROM databaseA.dbo.Table5 a 


SELECT a.datafield7 As Col1, a.datafield8 As Col2, b.datafield12 As Col3