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)
Fill in the Connection Properties Window
Write the query which you want to display in Data tab
Design the MainReport as like following picture
After designing, click the preview
Add another report names SubReport and do the same steps as we have done above.
When writing a query we have to mention where condition because we should receive parameter value from the mainreport
Design the subreport
In this time, it asks parameter value in a textbox (contID which have mentioned in query)
Fill the textbox and click view report
Creating reports (mainreport and subreport ) are over
Now we should link the reports
Go to Layout of MainReport
Right click of the field in which you should connect with another report
Click Navigation tab in Properties Window
Select jump to report
Select the subreport in that dropdown list box
Click Parameters button and select Parameter Name and Parameter Value Which we have to pass value to subreport
Save and Run the Project
Screen looks like below picture
When we drag over the mouse in ContactID fields, Mouse Icon should be changed
If you click here in contacted field, it shows subreport for the corresponding contacted value
If you want to return back to mainreport, click the icon which is mentioned Back to Parent Report like below picture.
Do the all steps and enjoy linking reports.
Is it possible to call sub report from report using Matrix?
Still now i have not used any Matrix Report.
If i aware, let you know or post article about this soon.
Yes All. It's possible in Matrix reports too.
You can achieve this using the above steps.
I'm new on SSRS and after I read this post I'm a litle confused (I hope somebody can explain this to me): Isn't the above example a Drillthrough Report? Is the Drillthrough Reports the same as Subreports?
Any clarification will be really appreciated.
Anyway, it is a great post, the article is very well explained and the screenshots are very helpful.
Thanks for giving the good article. Could you please post the SSRS sample using the graphical representation?
Thanks in advance!!!
I am preparing that one only.
Will post very soon.
Thanks for your comments.
Thanks to the article which resolved my issues it is easy to understand.
rkb, Thanks for your comments.
This article really helps for getting started with SSRS.
Keep up the good work.
Basa, Thanks for your comments
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 Man..easy to understand.