all groups > sql server reporting services > april 2005 >
You're in the

sql server reporting services

group:

Multiple datasources


Multiple datasources ajharvey NO[at]SPAM gmail.com
4/20/2005 7:18:40 PM
sql server reporting services:
Hi,

I've written a report that uses a matrix to display some data that all
comes from a funky select statement. The report is month based, so
there is a where clause specifying the month in the select

The user now wants to add a Year to Date column. Because of the data
structure of the data i don't believe it is possible to pull the YTD
figure in the same statment.

Is it possible to have one of the columns in a matrix (or any other
control) that is based on a different dataset which takes a parameters
from the matrix row?

I'm guessing theres not, but I just want to make sure, theres alot of
smart people out there :)

Thanks
Andrew
Re: Multiple datasources Bruce L-C [MVP]
4/20/2005 11:07:16 PM
What you want to do is to investigate subreports. You can embed a subreport
into a column (I have done this). If the subreport returns multiple rows
then that column would go down multiple rows. In your case you will only be
returning a single row. You will want the subreport to be very simple
(obviously) since you are embeding it. Note that the subreport is called for
every row. What I do in this case is hide the report in list view so users
don't see it when selecting a report to run.

To develop a subreport you develop it like a normal report with parameters.
Make sure it works. Drag and drop the report into the column you want (add
an extra column/field that is blank and drop it into it). Then do a right
mouse click on the embeded subreport and select parameters to map the
subreport parameters to the appropriate field.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: Multiple datasources ajharvey NO[at]SPAM gmail.com
4/21/2005 2:51:05 PM
Thanks,

I'll give that a try
AddThis Social Bookmark Button