Archive

Posts Tagged ‘Sub-report’

SSRS – Sub-report

November 13, 2011 Leave a comment

Sub-report is a way to show the additional information bases on the report information. Primary goal of the sub-report is to provide primary information in the report by hiding the additional information so the user could get the additional information wherever required as a request.
Here, we are using the previous post report as sub-report so please read my previous post for any additional information.
 
Step 1: Source query of the report as

SELECT  p.ProductKey AS [ProductID],
        p.EnglishProductName AS [ProductName],
        p.Color AS [ProductColor]
FROM    dbo.DimProduct AS P

 
Step 2: Get the report columns and the sub-report to the Tablix as

 
Step 3: Set up the sub-report properties, to link the sub report reference from the existing report, here we are using my previous post report as sub-report

 
Step 4: Visibility property setup is the magic of the sub-report, we are hiding the sub-report by toggling to the [ProductName] i.e. we will get the additional sub-report details by using [ProductName]

 
Step 5: We could pass the parameter value from the main report to the sub-report for data driven report by setting up the parameter visibility to hide on the sub-report

 
Step 6: Run the report to view the preview as

 
Step 7: We could use the [ProductName] toggling to get the sub-report details as

 
Step 8: We could also use the existing linked report setup on the sub-report to get the linked report as

 
Points to consider:
 
1. I have used previous posts reports as sub-report so please visit my previous post on development of sub-report
2. The format of the report is not at the production standard as initial plan to present only the logic of the sub-report

Categories: SSRS Tags: