SSRS subreport

In this SSRS tutorial I will show you how to create subreport in SSRS. I will use SSRS 2008 R2 but this tutorial should also work in SSRS 2008 and SSRS 2012.

Just to clarify a subreport is a report which we want to display (embed) in main report.

First picture shows a report with sparkline which takes one parameter @date. In this tutorial I will use this report and emded it into main report.


Make sure that you have Dataset, Data Source and Parameter setup already.

In our example we will create a dataset called TrendWeeks which actually will contain only 1 row! We will use it to force a table to display a one cell we will add our subreport.

NOTE: Normally you would use real life dataset and display a subreport once or multiple times (many rows) with different parameters.

Our subreport takes one parameter "date" and in our main report we will create the same parameter "date" and pass it to the subreport.

NOTE: Very often you will pass either parameters to a subreport which is presented in this tutorial or you will pass values from a field which we will try to cover in a separate SSRS tutorial.

Below is a screenshot from where we start:

Want full access?

Membership from $6/month

7 Days FREE Trial

Related lessons:

Learning Map