Archive

Posts Tagged ‘Linked report’

SSRS – Linked report

November 9, 2011 4 comments

Linked report is a great way to present the additional business information to the existing higher granularity report. We could only request the additional lower granularity information in an additional report.
Here I am using the previously developed report as a linked report, please visit the previous post for additional information of linked report development.
 
Step 1: Source queries of report and parameter
 

  
-- Sales Order Liked Report dataset
USE [AdventureWorksDW2008R2]
SELECT  FIS.SalesOrderNumber,
        CONVERT (DATE, CAST(FIS.OrderDateKey AS VARCHAR)) AS [OrderDate]
FROM    dbo.FactInternetSales AS FIS
WHERE   ProductKey = @ProductID
ORDER BY OrderDate DESC

-- Parameter dataset
SELECT DISTINCT
        ProductKey AS [ProductID]
FROM    dbo.FactInternetSales
ORDER BY ProductID

 
Step 2: Developed a standard tablix report with datasets including the parameter as

 
Step 3: The parameter properties setup are similar to the standard development process as

 
Step 4: Link the child report to the main report as

Select the column to assign the child report
Right click -> placeholder properties -> Actions

Option 1: select the Go to report and select the child report need to link to the report
Option 2: Passing the parameter value from the report to child report

 
Step 5: Open the child report parameter properties to setup the visibility properties

Option 3: setup the parameter properties at child report so that the passing parameter value from the actual report will assign to child report behind the scenes

 
Step 6: Run the report, select the Product ID parameter value. The report view comes with the selected parameter value
On the report data view, select any of the value i.e. SO75087 selected

 
Step 7: The linked report will be executed and open in a new report window by passing the parameter value behind the scenes i.e. SO75087

 
Points to consider:
 
1. The linked report developed based on existing report developed on previous post
2. The child package needs to updated the parameter properties setup as discussed in step 5
3. I am planning to use the linked report in future for sub report presentation

Categories: SSRS Tags: