
212
❘
LESSON 23 Building a Matrix report
5. Select AdventureWorksDW2008 from the database drop-down menu.
6. Click OK in both windows.
7. Right-click the Shared Datasets folder in the Solution Explorer and select Add New Dataset.
8. Name the dataset SalesbyRegion.
9. Select AWDW from the Data Source drop-down menu.
10. Use the following query in the Query window; this query is in the code files included with
this book and can be copied from there.
SELECT FactResellerSales.OrderQuantity, FactResellerSales.SalesAmount,
DimReseller.ResellerName, DimGeography.City,
DimGeography.StateProvinceName, DimGeography.EnglishCountryRegionName,
DimDate.CalendarQuarter, DimDate.CalendarYear
FROM FactResellerSales
INNER JOIN
DimDate ON FactResellerSales.OrderDateKey = DimDate.DateKey
INNER JOIN
DimReseller ON FactResellerSales.ResellerKey = DimReseller.ResellerKey
INNER JOIN
DimGeography ON DimReseller.GeographyKey = DimGeography.GeographyKey
Where EnglishCountryRegionName = ‘United States’
11. Click OK.
12. Right-click the Reports folder in the Solution Explorer and select Add ➪ New Item.
13. Select Report and change the name to SalesbyRegion.rdl. Click OK.
14. Right-click the Data Sources folder in the Report Data window and select Add Data Source.
15. Name the data source AWDW.
16. Click the radio button next to “Use shared data source reference.”
17. Select AWDW from the Shared Data ...