Pages

Monday, 6 August 2012

Drillthrough report in SSRS Step by Step

Drillthrough report in SSRS

A Drillthrough is a kind of report that a user opens by clicking a link within another report. Drillthrough reports commonly contain details about an item that is contained in an original summary report. The data in the drillthrough report is not retrieved until the user clicks the link in the main report.

Here I am showing you how to create Drillthrough Report.
For this I am creating two Report  i.e. Parent and Child Report.

Here is an example from  AdventureWorks Database for Parent Report.




SQL Scripts
SELECT        CustomerID, ContactID, Demographics, ModifiedDate
FROM            Sales.Individual

Now insert a table and  Format the column


And Now create a Child Report
Here I am also using  AdventureWorks Database for Child Report.




SQL Scripts
SELECT        CustomerID, ContactID, Demographics, ModifiedDate
FROM            Sales.Individual
WHERE        (CustomerID = @CustID)

Here I am creating a Parameter Custid.

Here both report created and now its time to map the parent report to child report. For this
We go to the parent report [CustomerID] column.

Right click on [CustomerID] column and choose Text Box Properties


Go to Action tab and map these:


Then Click on OK.

And now run the report. Below the preview of Drillthrough report.