This documentation explains the step-by-step procedure to create master-detail report that displays the detail records from a sub-report.
Parameters
. Then, click New parameter
in the parameter panel.ProdSubCat
, the prompt as ProdSubCat
and set visibility to hidden
.Save
.ProdModel
.
The ProductCatalog
dataset is created using the following query.
SELECT top 60 PS.Name AS ProdSubCat, PM.Name AS ProdModel, PC.Name AS ProdCat, PD.Description, PP.LargePhoto,P.Name AS ProdName,P.ProductNumber, P.Color, P.Size, P.Weight, P.StandardCost,P.Style,P.Class, P.ListPrice
FROM Production.Product P INNER JOIN
Production.ProductSubcategory PS INNER JOIN
Production.ProductCategory PC ON PS.ProductCategoryID = PC.ProductCategoryID ON P.ProductSubcategoryID = PS.ProductSubcategoryID INNER JOIN
Production.ProductProductPhoto PPP ON P.ProductID = PPP.ProductID INNER JOIN
Production.ProductPhoto PP ON PPP.ProductPhotoID = PP.ProductPhotoID LEFT OUTER JOIN
Production.ProductDescription PD INNER JOIN
Production.ProductModel PM INNER JOIN
Production.ProductModelProductDescriptionCulture PMPDCL ON PM.ProductModelID = PMPDCL.ProductModelID ON
PD.ProductDescriptionID = PMPDCL.ProductDescriptionID ON P.ProductModelID = PM.ProductModelID
WHERE (PMPDCL.CultureID = 'en') and PS.Name = @ProdSubCat and PM.Name = @ProdModel
You can download the created Detail report from here, Sample report.
The ProductCatalog
dataset is created using the following query.
SELECT top 60 PS.Name AS ProdSubCat, PM.Name AS ProdModel, PC.Name AS ProdCat, PD.Description, PP.LargePhoto,P.Name AS ProdName,P.ProductNumber, P.Color, P.Size, P.Weight, P.StandardCost,P.Style,P.Class, P.ListPrice
FROM Production.Product P INNER JOIN
Production.ProductSubcategory PS INNER JOIN
Production.ProductCategory PC ON PS.ProductCategoryID = PC.ProductCategoryID ON P.ProductSubcategoryID = PS.ProductSubcategoryID INNER JOIN
Production.ProductProductPhoto PPP ON P.ProductID = PPP.ProductID INNER JOIN
Production.ProductPhoto PP ON PPP.ProductPhotoID = PP.ProductPhotoID LEFT OUTER JOIN
Production.ProductDescription PD INNER JOIN
Production.ProductModel PM INNER JOIN
Production.ProductModelProductDescriptionCulture PMPDCL ON PM.ProductModelID = PMPDCL.ProductModelID ON
PD.ProductDescriptionID = PMPDCL.ProductDescriptionID ON P.ProductModelID = PM.ProductModelID
WHERE (PMPDCL.CultureID = 'en')
You can download the previously created master report from here. Sample master report.
The following steps explain how to link sub-report (product category detail records
) to a master report.
Description
) and select Insert Row
, then click the Inside Group-Below option
.Ctrl Key + Mouse left click
combination.Merge Cells
.properties panel
.Set Parameters
, followed by the Add
button.ProdSubCat
and value to =Fields!ProdSubCat.Value
.ProdModel
and value as =Fields!ProdModel.Value
.