Workaround - LookupFunction in 2008

  • 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!

  • 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

  • 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].

    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

  • Very usefull, Thanks!

    Regards

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply