How to repeat table header on every page in RDLC report

2011-06-14


When you build a .RDLC report in Visual Studio 2010 just like following one, you will see the table header can not repeat on every page when you change pages.

repeatHeader00_0

Then you might select the table and go to its properties to set something, see below, there are two properties RepeatColumnHeaders and RepeatRowHeaders, you can set them to True.

But wait, Do they work? NO! they don’t work, your table header still can not repeat on every page. Is it a bug? This question should be for Microsoft. There was somebody reported the similar issue, but today these 2 properties seems still do no work. 

repeatHeader01

There is an around way:  Put the table header to Page header section. Yes, this way works. However, you have to adjust the space between table header and table data rows.

Is there any better solution?

Yes, there is. Please go back to your Visual Studio RDLC design screen, look at the right bottom corner in design part. There is a small black rectangle there. Click it and check what you can see:

repeatHeader00

Yes, you can see "Advanced Mode", please check on it.

repeatHeader02

After you check on Advanced Mode, you will see Row Groups and Column Groups like below:

repeatHeader03

Click "Static" in Row Groups list, and check the properties on the right side:

Set "RepeatOnNewPage" to "True".

repeatHeader04

Save your works and build. and preview or view your report, you can see the table repeat on every page now.