SSRS
Parameters and Data Filtration
Rev 1407R04
Naji El Kotob
naji [@] dotnetheroes.com
www.DotNETHeroes.com
Outlines
 Introduction to SSRS
 AdventureWorks Database
 Datasets
 Multi-Valued and Cascading Parameters Report
 Interactive DEMO
 Q&A
 References
Adventure Works Database
 Adventure Works Cycles, the fictitious company on which the AdventureWorks
sample databases are based, is a large, multinational manufacturing
company.
 http://msftdbprodsamples.codeplex.com/
Design and Build your Queries
ProductCategoriesDataSet
SELECT
Production.ProductCategory.ProductCategoryID
,Production.ProductCategory.Name
FROM
Production.ProductCategory
ProductSubCategoriesDataSet
SELECT
Production.ProductSubcategory.ProductSubcategoryID
,Production.ProductSubcategory.ProductCategoryID
,Production.ProductSubcategory.Name
FROM
Production.ProductSubcategory
WHERE
Production.ProductSubcategory.ProductCategoryID IN (@ProductCategoryID)
ProductsDataSet
SELECT
Production.Product.ProductID
,Production.ProductCategory.Name AS [ProductCategory Name]
,Production.ProductSubcategory.Name AS [ProductSubcategory Name]
,Production.Product.Name AS [Product Name]
,Production.Product.Color ,Production.Product.ListPrice
FROM
Production.ProductSubcategory
INNER JOIN Production.Product
ON Production.ProductSubcategory.ProductSubcategoryID = Production.Product.ProductSubcategoryID
INNER JOIN Production.ProductCategory
ON Production.ProductSubcategory.ProductCategoryID = Production.ProductCategory.ProductCategoryID
WHERE
Production.ProductSubcategory.ProductSubcategoryID IN (@ProductSubcategoryID)
Configure Parameters
@ProductCategoryID
@ProductSubcategoryID
Displaying Single & Multi-Valued Report
Parameter Selections
 ="Category(s) Selected: " & JOIN(Parameters!ProductCategoryID.Label, ", ")
 ="Subcategory(s) Selected: " & JOIN(Parameters!ProductSubcategoryID.Label, ", ")
More touches!
="Category(s) Selected (" &
Parameters!ProductCategoryID.Count.ToString & "):
" & JOIN(Parameters!ProductCategoryID.Label, ", ")
Q&A
 Please send your feedback to naji [@] dotnetheroes.com
References
 http://www.sqlchick.com/entries/2012/2/25/displaying-single-multi-valued-
report-parameter-selections-i.html
 Samples and Walkthroughs - http://msdn.microsoft.com/en-
us/library/ms251686(v=vs.90).aspx

SSRS Report with Parameters and Data Filtration