At the Risk of Repeating Myself: The RepeatWith Property

February 15, 2013
Tags:

My friend Jes Borland (blog | twitter) invited me to contribute to her Making Data Tell a Story with SSRS Properties series, so I decided to introduce a property that doesn’t get much attention, the RepeatWith property.

Allow me to set the stage properly for this property. You have a table in a multiple page report. Of course, you set the RepeatOnNewPage property to display the table header row(s) on each page. But did you know you can also repeat other items alongside the table when using the HTML or PDF format?

Report Page 1 Report Page 2

To do this, set the RepeatWith property of the item to repeat. The item will repeat alongside the table on every page that contains the table. You can use the RepeatWith property of three types of report items: text box, rectangle, and line. To set the property value, you select the name of a data region—table, matrix, list, or chart—having the same parent as the item to be repeated. In my example above, both the table and the text box have the same parent: Body.

RepeatWith

In SQL Server 2005 and earlier, you don’t see the text box repeated with the table in Preview mode within BIDS, but you can confirm the results by deploying the report to the report server. I haven’t tested in SQL Server 2008 or SQL Server 2008 R2, but it definitely is visible in preview mode in SQL  Server 2012 in SSDT as you can see in the images above.

Incidentally, if you specify the RepeatWith property for a rectangle that contains a data region, you cannot render the report.

RepeatWith Error

 

Leave a Reply