Tuesday, May 26, 2015

SSRS Page Break After X Number of Records

In SQL Server Reporting Services you can add a page break after a desired amount of records.
Step 1: A simple design to show all rows in a table using table component.

Step 2: Add a group to the detail row

Step 3: Add group expression “=Ceiling((RowNumber(Nothing)) / Nth row)” and Click OK


Step 4: You may get the following error if you run the report after step 3.

Step 5: Open Row group properties  and remove sort expression.




Step 6:  Now, report will show 30 rows in a group. Next step is to define page break for the group. Go to page breaks tab and select page break option


Step 7: Now, hide the group header and detail column from the table component and run the report.



I hope this article will be very helpful to all. Thanks for reading this article.

“Keep reading and share the knowledge”  
“Grow more trees to save the Earth”

No comments:

Post a Comment