2.50 Matrix

Applies to RDL 2003/10 and RDL 2005/01

The Matrix element specifies a grid of regions that repeats with each column group and row group in the rowset. The grid consists of columns and rows that can optionally be filtered, sorted, grouped, nested, and repeated. Matrices provide functionality similar to crosstabs and pivot tables. Unlike a Table, which has a static set of columns, matrix columns can be dynamic.

A matrix has a number of components; these are the corner, dynamic row and static row group headers, dynamic column and static column group headers, and detail cells. The corner is a single cell in the upper-left corner. The corner cell can be used to display a label for the matrix or can be left empty. When the report is rendered, dynamic column headers expand right or left for as many columns as there are groups. Dynamic row headers expand down the page. The data that appears in the detail cells are aggregates based on the intersections of columns and rows.

The following are the parent elements, attributes, and child elements of the Matrix element.

Parent elements

ReportItems

CustomReportItem.AltReportItem

Attributes

Matrix.Name

Child elements

Matrix.Style

Matrix.Action

Matrix.LinkToChild

Matrix.Bookmark

Matrix.CustomProperties

Matrix.DataElementName

Matrix.DataElementOutput

Matrix.Label

Matrix.Height

Matrix.Left

Matrix.RepeatWith

Matrix.ToolTip

Matrix.Top

Matrix.Visibility

Matrix.Width

Matrix.ZIndex

Matrix.KeepTogether

Matrix.NoRows

Matrix.PageBreakAtEnd

Matrix.PageBreakAtStart

Matrix.DataSetName

Matrix.Filters

Matrix.CellDataElementName

Matrix.CellDataElementOutput

Matrix.ColumnGroupings

Matrix.Corner

Matrix.GroupsBeforeRowHeaders

Matrix.LayoutDirection

Matrix.MatrixColumns

Matrix.MatrixRows

Matrix.RowGroupings

The following is the XML Schema definition of the Matrix element.          

 <xsd:complexType name="MatrixType">
   <xsd:choice minOccurs="1" maxOccurs="unbounded">
     <xsd:element name="Style" type="StyleType" minOccurs="0" />
     <xsd:element name="Action" type="ActionType" minOccurs="0" />
     <xsd:element name="Top" type="SizeType" minOccurs="0" />
     <xsd:element name="Left" type="SizeType" minOccurs="0" />
     <xsd:element name="Height" type="SizeType" minOccurs="0" />
     <xsd:element name="Width" type="SizeType" minOccurs="0" />
     <xsd:element name="ZIndex" type="xsd:unsignedInt" minOccurs="0" />
     <xsd:element name="Visibility" type="VisibilityType" minOccurs="0" />
     <xsd:element name="ToolTip" type="xsd:string" minOccurs="0" />
     <xsd:element name="Label" type="xsd:string" minOccurs="0" />
     <xsd:element name="LinkToChild" type="xsd:string" minOccurs="0" />
     <xsd:element name="Bookmark" type="xsd:string" minOccurs="0" />
     <xsd:element name="RepeatWith" type="xsd:string" minOccurs="0" />
     <xsd:element name="CustomProperties" type="CustomPropertiesType" minOccurs="0" />
     <xsd:element name="KeepTogether" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="NoRows" type="xsd:string" minOccurs="0" />
     <xsd:element name="DataSetName" type="xsd:string" minOccurs="0" />
     <xsd:element name="PageBreakAtStart" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="PageBreakAtEnd" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="Filters" type="FiltersType" minOccurs="0" />
     <xsd:element name="Corner" type="CornerType" minOccurs="0" />
     <xsd:element name="ColumnGroupings" type="ColumnGroupingsType" />
     <xsd:element name="RowGroupings" type="RowGroupingsType" />
     <xsd:element name="MatrixRows" type="MatrixRowsType" />
     <xsd:element name="MatrixColumns" type="MatrixColumnsType" />
     <xsd:element name="LayoutDirection" minOccurs="0">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value="LTR" />
           <xsd:enumeration value="RTL" />
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:element>
     <xsd:element name="GroupsBeforeRowHeaders" type="xsd:unsignedInt" 
                  minOccurs="0" />
     <xsd:element name="DataElementName" type="xsd:string" minOccurs="0" />
     <xsd:element name="DataElementOutput" minOccurs="0">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value="Output" />
           <xsd:enumeration value="NoOutput" />
           <xsd:enumeration value="ContentsOnly" />
           <xsd:enumeration value="Auto" />
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:element>
     <xsd:element name="CellDataElementName" type="xsd:string" minOccurs="0" />
     <xsd:element name="CellDataElementOutput" minOccurs="0">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value="Output" />
           <xsd:enumeration value="NoOutput" />
           <xsd:enumeration value="ContentsOnly" />
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:element>
     <xsd:any namespace="##other" processContents="skip" />
   </xsd:choice>
   <xsd:attribute name="Name" type="xsd:normalizedString" use="required" />
   <xsd:anyAttribute namespace="##other" processContents="skip" />
 </xsd:complexType>