Lesson 3: Formatting a Matrix and Adding Totals

After you add a matrix and organize the data to display in groups, you can add totals, and format numeric values and text. In any single text box, you can format text to use multiple fonts and styles. You can merge cells in the column headers or cells in the corner of the matrix and add labels.

To format currency values

  1. Verify that the design surface displays the matrix you added in the previous lesson.

  2. Right-click the first cell that displays the field expression [Sum(LineTotal)], and then click Text Box Properties.

  3. Click Number.

  4. In Category, click Currency.

  5. Click OK.

    Next, you will paste the formatted value in the next cell.

  6. Right-click in the same cell, and then click Copy.

  7. Right-click in the other cell that displays the same field expression, and then click Paste. When you copy and paste the contents of a cell, the formatting for the cell is also copied.

    Next, you will add a column to display row totals.

To add row totals

  • Right-click in the column header that displays [Year], point to Add Total, and click After.

    A new column with the label Total is added to the right side of the matrix. The cell contents and style default to the formatted numeric field that was included in the [Year] column.

    Next, you will format row and column headers.

To format row and column headers

  1. Click the column handle of the first column and drag across to the next column handle. This selects the columns which contain the row headers Category and Subcat.

  2. From the Format menu, click Font, and then Bold.

    This formats the row group area for Category and Subcat.

  3. Repeat steps 1 and 2 for the first two row handles. This formats the column group area for Geography, Year, and CountryRegion.

  4. While the first two rows are still selected, from the Format menu, click Background Color. The Choose Color dialog box opens.

  5. Click More colors. The Select Color dialog box opens.

  6. In Standard color palette, scroll to LightBlue, and select it.

  7. Click OK. Click OK again. 

    You have formatted the row and column headers in bold text and set the background color for the column headers to light blue.

    Next, you will merge the cells for the Year column group and center the label.

To merge column cells and center text for column group headers

  1. Click in the column group header that displays [Year] and drag the mouse down one cell. Two vertical cells are selected.

  2. Right-click anywhere in the two selected cells and click Merge Cells. The cells are combined into one cell that spans two rows.

  3. Right-click in the merged cell, and then click Text Box Properties.

  4. Click Alignment.

  5. In Horizontal, click Center.

  6. In Vertical, click Middle.

  7. Click OK.

    The column header value [Year] displays in the center of the merged cell.

  8. Repeat steps 1 - 7 for the Total column.

    Next, you will merge cells in the corner area to remove the extra lines.

To merge cells in the corner area

  1. Click in the first left-corner cell and drag the mouse diagonally to select the four corner cells.

  2. Right-click anywhere in the selected cells, and then click Merge Cells.

    The cells are combined into one cell.

    Next, you will add a label to the corner cell that uses multiple styles and sizes.

To add a label that uses different styles and sizes of text

  1. Right-click in the corner cell, and then click Text Box Properties.

  2. In Value, type Sales by Area and Year.

  3. Click Alignment.

  4. In Horizontal, click Center.

  5. In Vertical, click Middle.

  6. Click OK.

  7. In the same cell, double-click the text Area. The word is highlighted.

  8. Right-click the highlighted text, and then click Text Properties.

  9. Click Font.

  10. In Size, click 14 pt.

  11. In Style, click Bold.

  12. Click OK.

  13. Repeat these steps for the word Year.

  14. Click OK.

  15. (Optional) Preview the report.

    The text in the corner cell displays multiple fonts and sizes.

Next Steps

You have successfully added totals and formatting to your matrix. Next, you will publish the report to a report server to share the report with others. See Lesson 4: Publishing a Report.