Search This Blog

Friday, 28 September 2012

How to restrict/set number of records per page in SSRS report

Sometimes we came into a situation where we need to show only a specific number of records on per page.
Let’s see how we can restrict the number of records on per page. I am assuming that you are good with your report design. So I will focus only on the required expressions/steps that will need us to achieve required page break in the report.
Step 1: Add a Parent Group under Row Group section. Now on popup window under Group by:” dropdown, use this expression:
Image -1
=Int((RowNumber(Nothing)-1)/10)
In this expression, you need to change 10 to
any desire number as you wish to see number of records on per page
Image-1 will help you regarding this step.
Step 2: Open the group properties window(Right Click on group name-> select Group Properties) of this newly added group.             
Image -2
           Go to Page Breaks and checked “Between each instance of the group”.
           Now go to Sorting and delete column/sorting expression (if any).
           You can also delete the 1st column of your table that has been created automatically on action of add new group by choosing “Delete Columns only” option from the prompt.

           Image-2 will help you regarding this step.
Now you are done. Preview your report and check report output.

You can download the sample report from following link.

3 comments:

  1. Can you let me know your issue?

    Have you tried attached sample https://docs.google.com/file/d/0ByYnpeuIfYV0WFg0VDJNZFlCMU0/edit?pli=1

    ReplyDelete
  2. This solution is working only for the tabular reports.if we are having drill down reports it throws an error like "RowNumber function with a scope parameter that is not valid. When used in a group expression, the value of the scope parameter of RowNumber must equal the name of the group directly containing the current group." Any idea...

    ReplyDelete