Groups | Blog | Home
all groups > sql server reporting services > february 2006 >

sql server reporting services : linking two datasets


msdnuser
2/21/2006 11:16:29 AM
I need to link two datasets in my table to make a calculation some thing like

Eg. (col1 from dataset1)/(relevant data from dataset2) .

To implement this is there any new way in sql server 2005 other than using
t-weilu NO[at]SPAM online.microsoft.com
2/22/2006 2:40:15 AM
Hi ringt,

Welcome to use MSDN Managed Newsgroup support.

From your description, my understanding of this issue is: You want to use 2
or more dataset in a single report. If I misunderstood your concern, please
feel free to point it out.

You can access data from 2 or more dataset in a report in both Reporting
Services 2000 and Reporting Services 2005.

In a textbox, you can use the following statement

=Filed!<columnname>.value / Sum(Fields!<columnname>.Value, "<dataset2>")


Hope this will be helpful!



Wei Lu
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
msdnuser
2/22/2006 12:01:31 PM
Hi Wei,

Your understanding of my issues is partially correct. Yes I need two
datasets in my report. In the textbox I want do something like this,

=Fields!numerator.value / Sum(Fields!denominator.Value, "<dataset2>").

But let us take in the first dataset the data is like this
Col1 Col2 Col3
x y numerator

and second dataset is like this
Col1 Col2 Col3
x a denominator

Then I want

numerator (for x of Col1)/denominator(of dataset2 for x)

Thus I want the denominator to be linked to (or based up on or match to the
1st column of) dataset1.

Is it possible in any way other than using subreport and passing the x to
subreport to fetch the right denominator.

Thanks






[quoted text, click to view]
t-weilu NO[at]SPAM online.microsoft.com
2/23/2006 12:00:00 AM
Hi ringt,

Thanks for the update.

Unfortunately, i don't think you can query the dataset with parameter in
the expression.

Here is a MSDN article about how to using the Dynamic query in a report.
Maybe it will be a help:
Using a Dynamic Query in a Report
http://msdn2.microsoft.com/en-us/library/ms166931(SQL.90).aspx


Hope this will be helpful.

Sincerely yours,

Wei Lu
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button