SQLTeam.com | Weblogs | Forums

SSRS Two Dataset Valus in one column

sql2012

#1

I have two Datasets in my SSRS report and both dataset coming from different database. and there impossible to join them.

I used Lookup funcation as i said there is no column where i Join them.

Example not real Data ..... so what im tring to do is (Dataset1 - Visitor) total number of Visiter divided by (Dataset2 - Cars) Total number of Cars * 1000 (sectors) row group by every month and Year.

for example (not real) if we have 24 Visitors and 2063 Cars *1000 so we get AVG of 1000 Sectors 11.63

Is there any funcation in SSRS where i solve this problem IN Excel you know i easy but I need to create report in SSRS please any help would safe me. Thanks


#2

It's not impossible to join data sets from two different databases. We do it all the time:

select a.col1, b.col2
from database1.dbo.table1 as a
join database2.dbo.table2 as b
where a.id = b.id

Is perfectly valid, unless the instance is configured with cross-database queries disabled

ALTER DATABASE Database1 SET DB_CHAINING ON;
ALTER DATABASE Database2 SET DB_CHAINING ON;