CHAPTER 4 LAYING OUT A REPORT
Note In all releases since SSRS 2008, the Tablix property refers to Table, Matrix, and List objects, and
therefore the RDL, which previously referenced Table or Matrix specifically, now references Tablix.
Listing 4-2. RDL Section for Table Data Region
<TablixCell>
<CellContents>
<Textbox Name="textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>17</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
The completed report for the Table object is called Table.rdl and is in the Pro_SSRS project.
Implementing a Rectangle
The Rectangle data region, as discussed earlier, is similar to the List data region in that it’s a free-form
container object for report items and encapsulates all the objects into one defined area, so when it’s
repositioned or deleted altogether, the objects inside are repositioned or deleted too. As with all the
other report objects and data regions we’ll cover, you can position and scope the rectangle inside other
data regions.
The Rectangle data region is more limited than the List data region, as it contains no grouping
levels. You can, however, group the objects or data regions inside a Rectangle and use rectangles in
several creative ways in an SSRS report. You will pick up where you left off on the previous sample, using
the Table data region, and add a Rectangle as a placeholder inside the table. This way, you can add a
level of free-form design to the report while maintaining the structure afforded by the Table data region.
In this example, we will also use the Textbox report object that we introduced previously. A Textbox can
contain literal string values such as a report title; it might also contain an expression. You can use a
Textbox object to add titles to the free-form objects that you place inside the Rectangle.