Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 how to link or tie subreport to main report

Author  Topic 

osupratt
Posting Yak Master

238 Posts

Posted - 2009-02-09 : 13:12:14
I have a main report that has one group Location. This is from Stored Procedure. I have another Stored Procedure for a report that I drop in as a subreport on the main one. Right now the report will show Locations and it's data fine:

Dallas
xyz
Tulsa
abc
Hartford
efg

then at the end the sub report shows it's data

Dallas
123
Tulsa
456
Hartford
789

How do I link the subreport to the main report? In access there is the parent child link for subreport to main report.

I need to be able to link the Location field on each report (main and sub) for the subreport to show as a summary under the location on the main report. Hope this makes sense. I can't figure it out. Thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-09 : 13:14:36
why cant you merge both the data onto same report? i dont think subreport is necessary here at all.. also it will be much slowly as you're trying to call it for each row.
Go to Top of Page

osupratt
Posting Yak Master

238 Posts

Posted - 2009-02-09 : 14:01:41
I'm not sure what you mean. I can test with two datasets. When I try to add data from the second dataset into the footer row of the report (on LOCATION) to act like a summary; it doesn't tie in or link to the LOCATION group. I have a page break after this group. I want to see:

dataset1: DALLAS somedata
dataset2: DALLAS somesumdata

page break

dataset1: PHOENIX somedata
dataset2: PHOENIX somesumdata

When I tried to merge this is what I get:

dataset1: DALLAS somedata
dataset2: DALLAS somesumdata
dataset2: PHOENIX somesumdata
dataset2: NEWYORKCITY somesumdata

etc.

Go to Top of Page

osupratt
Posting Yak Master

238 Posts

Posted - 2009-02-09 : 18:31:28
finally struggled through and figured it out. i would like to know though is there an easier way to format the subreport to match column widths of main report? i have the same size on both, but when inserting the subreport it seems to shrink a bit. is there anyway to see the columns of the subreport while it's in the main report?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-09 : 23:26:44
quote:
Originally posted by osupratt

I'm not sure what you mean. I can test with two datasets. When I try to add data from the second dataset into the footer row of the report (on LOCATION) to act like a summary; it doesn't tie in or link to the LOCATION group. I have a page break after this group. I want to see:

dataset1: DALLAS somedata
dataset2: DALLAS somesumdata

page break

dataset1: PHOENIX somedata
dataset2: PHOENIX somesumdata

When I tried to merge this is what I get:

dataset1: DALLAS somedata
dataset2: DALLAS somesumdata
dataset2: PHOENIX somesumdata
dataset2: NEWYORKCITY somesumdata

etc.




i was asking whether its not possible to bring all data in same dataset?
Go to Top of Page

osupratt
Posting Yak Master

238 Posts

Posted - 2009-02-10 : 16:54:57
no. sorry.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-14 : 02:25:28
quote:
Originally posted by osupratt

no. sorry.


why?
Go to Top of Page
   

- Advertisement -