Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Workaround - LookupFunction in 2008 Expand / Collapse
Author
Message
Posted Monday, December 17, 2012 8:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Hi geniuses!

I have to edit some reports in SSRS 2008 and figure that I'm going to need to use data from different datasets.
I previously worked with SSRS 2008 R2 and used the Lookup function wich doesn't exist in 2008.
I could use subreport but it would be a real pain in ***, and would interfere with the performance of the report.
Do you any way of merging/joining different datasets using expressions in 2008 (non R2)

Thanks in advance!
Regards to all!
Post #1397295
Posted Thursday, January 3, 2013 12:57 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 15, 2014 7:50 AM
Points: 25, Visits: 155
i think its better to do it in query... so that u can have all the data in one data set.. may be you can use union if I am not wrong
Post #1402520
Posted Sunday, January 6, 2013 4:33 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 10:57 PM
Points: 458, Visits: 857
The way I usually do this is to create a linked server object on the SQL server database, and then in the query you can do something like this

select a.column, b.column2 
FROM
[server1].[db].[schema].[table] a join [server2].[db].[schema].[table2] b on
a.common = b.common

Or you can make use of the Openquery() or Openrowset() functions.

It's a shame that reporting services doesn't have good objects to do joins and won't let you use multiple datasets in the same tablix, but then again the linked server option already exists and it's always going to be faster to do any joins with the database engine rather than bringing all the data into reporting services and doing it that. That tends to be a general rule with reporting services - do as much as you can in SQL or MDX and just use expressions for formatting or presentation tasks.

A second option that I occasionally use is to refer to cells in other tablixes directly.
For example if you have 2 tablixes that each connect to different data sets (from different databases), in tablix 2 you can refer to cells from tablix 1.

i.e. if you have a cell in tablix 1 that you have named "textbox1" then in tablix 2 you could use this expression:

=ReportItems!textbox1.value

Post #1403373
Posted Monday, January 7, 2013 2:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Very usefull, Thanks!

Regards
Post #1403494
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse