We can design a SSRS report with a constraint of only N rows per page. It will be interesting if I explain this with an example.
Scenario
Report developer get a request from team lead saying… Design a simple report with table component and display all rows available in a table x. But, you should show only 10 rows per page in the SSRS report. PS: I am expecting this report to be done with in 15 mins.
The brave report developer just design a report by pulling data to the report without our the 10 rows per page constraint.
I will be showing you that how to display only N rows in the report in this article.
Implementation
Design a report as described in the article. This implementation topic has page break configuration in the report.
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.
Thanks for reading. Please subscribe for e-mail for instant article delivery to your inbox. For latest updates vision Facebook page SQLServerRider.com and like the page.
No comments:
Post a Comment