SSRS – Creating a subreport and managing multiple subreports and linking them – Part 5


SSRS – Creating a subreport and managing multiple subreports and linking them and passing parameters between them. This article explains the basic steps of creating a subreport and managing multiple reports and linking them and passing parameters between them.

SSRS – Creating a subreport and managing multiple subreports and linking them and passing parameters between them – Part 5



This article explains the basic steps of creating a subreport and managing multiple reports and linking them and passing parameters between them.

Open SQL Server Business Intelligence Management Studio

Create a MainReport.rdl

(Note: If you not familiar to create report, find the previous sections)

1

Fill in the Connection Properties Window

2

Write the query which you want to display in Data tab

3

Design the MainReport as like following picture

4

After designing, click the preview

5

Add another report names SubReport and do the same steps as we have done above.

6

7

When writing a query we have to mention where condition because we should receive parameter value from the mainreport

8

Design the subreport

9

Click preview

In this time, it asks parameter value in a textbox (contID which have mentioned in query)

Fill the textbox and click view report

10

Creating reports (mainreport and subreport ) are over

Linking Reports



Now we should link the reports

Go to Layout of MainReport

Right click of the field in which you should connect with another report

Select properties

11

Click Navigation tab in Properties Window

Select jump to report

Select the subreport in that dropdown list box

12

Click Parameters button and select Parameter Name and Parameter Value Which we have to pass value to subreport

13

Ok

Click Preview

Save and Run the Project

Screen looks like below picture

When we drag over the mouse in ContactID fields, Mouse Icon should be changed

14

If you click here in contacted field, it shows subreport for the corresponding contacted value

15

If you want to return back to mainreport, click the icon which is mentioned Back to Parent Report like below picture.

16

Conclusion



Do the all steps and enjoy linking reports.



Reference: http://www.dotnetspider.com/resources/42873-SSRS-SQL-Server-Reporting-Services-Create.aspx


Article by Prabu Thangavelu
Prabu Thangavelu Follow me: http://prabuthangavelu.blog.com/ or https://twitter.com/prabuthangavelu

Follow Prabu Thangavelu or read 25 articles authored by Prabu Thangavelu

Comments

Author: Prabu Thangavelu29 Jul 2011 Member Level: Gold   Points : 1

Still now i have not used any Matrix Report.

If i aware, let you know or post article about this soon.

Author: Prabu Thangavelu13 Oct 2011 Member Level: Gold   Points : 0

Yes All. It's possible in Matrix reports too.

You can achieve this using the above steps.

Author: Vidhya15 Nov 2011 Member Level: Gold   Points : 0

Hi,

Thanks for giving the good article. Could you please post the SSRS sample using the graphical representation?


Thanks in advance!!!

Regards,
Vidhya

Author: Prabu Thangavelu15 Nov 2011 Member Level: Gold   Points : 0

Yes. Sure.

I am preparing that one only.

Will post very soon.

Thanks for your comments.

Author: rkb22 Mar 2012 Member Level: Silver   Points : 0

hi,

Thanks to the article which resolved my issues it is easy to understand.

regards,
rkb

Author: Prabu Thangavelu22 Mar 2012 Member Level: Gold   Points : 0

rkb, Thanks for your comments.

Author: Kalyan Basa26 Mar 2012 Member Level: Bronze   Points : 0

Hi Prabu,

This article really helps for getting started with SSRS.

Keep up the good work.

Thanks,
Kalyan Basa

Author: Prabu Thangavelu29 Mar 2012 Member Level: Gold   Points : 0

Basa, Thanks for your comments

Guest Author: Conficker30 Apr 2012

Hi Prabhu,

This article was really helpful for subreport.

quick question, i have sub report in tables row in main report, if theres is no data then how to hide that row??

Thanks,

Guest Author: Karna28 Sep 2012

Thanks Man..easy to understand.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: