Is there any workaround for having two different DataSets within a single table in SSRS2008 R2
All, As the title of this post, I want to bind fields from two different data sets (whereas data source could be the single one) into a single table. I know it will give you an error if you try to do this, but is there any alternative workaround possible to achieve the same? For example, below is the thing I want to achieve:- I have one table in ssrs 2008 R2: Tablix1 I have two different datasets : DataSet1, DataSet2 (but both of them are from same single data source- SharedDataSource) DataSet1 has fields like:- f1, f2, f3 DataSet2 has fields like:- f9, f10 --Is it possible to achieve in Tablix1 below columns? :- f1, f2, f3, f9, f10 Hope concern is very much clear. Any idea? Thanks,
November 23rd, 2010 2:00am

2008R2 , yes it is possible . LookUp() , LookUpSet() , MultiLookUp() . http://blog.hoegaerden.be/2010/05/16/looking-up-data-on-different-sources/ http://msdn.microsoft.com/en-us/library/ee210531.aspx Thanks . Rajkumar Yelugu
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 2:11am

If both the dataset are retrived from the same datasource, you can try a join in the datasource itself. However if your queries cannot be rewritten, you may use the lookup, lookupset or multilookup functions in SSRS R2. Below is a link that shows with examples how each function can be used. http://www.mssqltips.com/tip.asp?tip=2141 Regards Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
November 23rd, 2010 2:54am

Thanks Bilal and Rajkumar for giving alternative way. Let me try doing Lookup in my case.
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 9:58am

Guys, I have successfully implemented Lookup expression for above req. I mentioned. And now I am getting, in Tablix1 below columns:- f1, f2, f3 (from DataSets1) And f9, f10 (from DataSets2) -But I have another question here: Is it possible I can add "Total" (i.e. SUM) for this LookUp expresion I created ? Because, I am basically creating one Group and its "GroupFooter" should have Total of the fields. So, for the rest of the fields I can simply use SUM function, but for the Lookup exprssion I wrote that should also have "Total" in its GroupFooter field. Is it possible to achieve Total field for this Lookup expression. or any other inconvinient workaround for the same? Any help would be appreciated on this brand new feature of R2. Thanks,
November 23rd, 2010 11:57am

any insights on this topic, how to add Total field for Lookup expression I mentioned above ?? Thanks,
Free Windows Admin Tool Kit Click here and download it now
November 24th, 2010 4:06pm

Hi Tej-BI, For your second question,we could not sum the referenced field values via LookUp directly. If you have to do it, you can add a pagebreak between the Tablix groups, then enable Page Footer and type the expression: =SUM(ReportItems!Textbox1.value) to display the group summation, the Textbox1 is the cell where the lookup expression allocated. thanks, Jerry
November 25th, 2010 3:20am

Hi Jerry, As you told, I might not want to add page break between tablix groups and then do page footer. Is there any other possible work-around to get the SUM of Lookup expression? Thanks,
Free Windows Admin Tool Kit Click here and download it now
December 7th, 2010 3:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics