You are on page 1of 3

BusIT105

Create a Matrix Report from a Cube


Purpose

In this activity you will create a new Reporting Services report whose data source is an Analysis
Services cube. The report you create will display Internet sales by product category and product
subcategory in a matrix format. It will look something like this:

Note: In the following text, I refer to shortened names for the dimension attributes. For example, I use
Product Category when referring to the attribute EnglishProductCategoryName.

Exercise

Open an already existing Reporting Services project with the cube you have been using available as
a data source. (You can use the project from the previous activity.)

In Solution Explorer right-click Reports and select Add and then select New Item

In the Add New Item Dialog select Report in the Right pane and name the report
MatrixReport.rdl and click Add to go to the Report Designer

Creating a Matrix Report.docx

Page 1

BusIT105

Specify the Data Source for the report


o Use the InternetSalesCube you created as the data source
Name the data source appropriately

Do this using the techniques described in the video

Create a new Dataset for the report and rename it appropriately

Using techniques from the video, choose the Data Source and navigate to the Cube Browser
dialog

Expand Measures and drag internet Sales Amount to the Drag Levels or Measures
Here pane

Expand the Product dimension and add the Product Category attribute to the left of the
Sales Amount

Drag the Product SubCategory attribute to the right of the Product Category attribute

Expand the Customer dimension and add State-Province and Country-Region


attributes following the Sub Category

Define the layout by selecting the Design Tab

Open the toolbox and drag a Matrix to the layout

You will see a 2 by 2 matrix, with a Columns, Rows and Data cells, plus a blank cell in
the upper left hand corner. Again, the intersection of each row and column is a textbox

Drag the following elements from the dataset and drop them as follows:

Country-Region to the columns cell.

Then drag State-Province and drop it just below the Country-Region. Note: This
drag and drop is a bit tricky (a.k.a. problematic). You should see an extra row
inserted below the Country-Region and the State-Province header should appear
there. State-Province should not appear in the data cell. If the State-Province is
above the Country-Region, you can change it in later steps.

Drag Product Category to the Rows cell, and then drag Product SubCategory to
the right of the Product Category in the rows line.

Finally drag SalesAmount to the data cell.

Format the SalesAmount to display as currency

Adjust the column names to be more user friendly

Preview the report.

Review the Row Groups and Column Groups sections (at bottom)

Note that two groups have been created automatically for rows. They are Product
Category and Product SubCategory, with Product Category the major group

Note also that two groups have been created automatically for columns. They are
Country-Region and State-Province.

Right click on the minor group for columns (State-Province) and click Group
Properties. Select the Visibility tab and set the initial visibility to Hide. Set the
toggle value from the drop-down list to be Country-Region.

Set the appropriate Visibility for the minor row group (Sub Category).

In the blank upper-left cell type Internet Sales and make it bold. This will be a label for the
report.

Creating a Matrix Report.docx

Page 2

BusIT105

Format cells as follows

Using the textbox properties (Property Window) set all cells except the Sales Amount to
be Bold

Using the textbox properties set the Outer Row and Column cells to be White
Foreground color and MidNight Blue Background

Using the textbox properties set the Inner Row and Column cells to be a color of
your choice

Add a border to the Sales Amount cell

Preview the report and if necessary return to layout and make any adjustments.

Add sub-totals

Right-click in the Product SubCategory cell and select Add Total, Before. Format
this cell with a contrasting foreground and background color to differentiate it from
other cells.

Right click in the Product Category cell and select Add Total, After and adjust
colors appropriately

Preview the report.

Your report should look something like that above.

Examine the differences between having the following combinations of row totals, and determine
which you prefer.

No sub totals

Only the inner group with a sub total

Only the outer group with a sub total

Both groups with a sub total

Creating a Matrix Report.docx

Page 3

You might also like