Freigeben über


Limits the number of records per page in SSRS 2012.

Hello folks,

While working on the requirement to fix the number of records per page in the report, I found that there is no such out of the box (OOB) property in SSRS 2012 to do so, However this can be achieved by some workarounds :). Below are the steps.

  • Navigate to the Rows Groups section and then Details. Select Add Group -> Parent Group -> Choose Expression in Group By (Leave Add group header/Add group footer as unchecked)
  • Paste the following code into the expression box.

=int((RowNumber(nothing)-1)/25)

  • In the group property navigate to Page Breaks option and select "Between each instance of a group" and leave the other options below unchecked.
  • If you run your report, you could get error saying "A sort expression for tablix ‘Tablix...’ uses the RowNumber function. RowNumber cannot be used in sort expressions." To fix the error remove the default sorting expression created in the group properties.
  • By default the added SSRS group also gets added in Tablix column, if you wish not to keep this, you can remove this (Be careful to delete columns only and not the columns and associated groups.

Since it's a workaround, it has some constraint too :) which is when you export the report to excel, it exports different pages into different sheets which may not acceptable in all the cases but if export to excel is not a requirement, you may live with it.

Please share your comments...

Comments

  • Anonymous
    November 12, 2013
    i also need a solution of this problem

  • Anonymous
    January 21, 2014
    Hi, I could not solve the issue, My requirement is here: For Ex:  i have  9 lines in mu sales quote , i would like to print 3 records per page and the footer should show at the bottom of the every page. but when i follow this one   its printed first 3 records and every page printing 1 record . I don't know how to solve this, help me here...

  • Anonymous
    March 04, 2014
    A sort expression for the tablix ‘Tablix3’ uses the function RowNumber. RowNumber cannot be used in sort expressions.

  • Anonymous
    March 25, 2014
    Hey Prakash, I am trying to do the same thing in a stepped report where in I have a parent group and two child groups, I am not sure at which row group do I need to add the new group, it only gives me one row per page. Any ideas?

  • Anonymous
    March 25, 2014
    Hey Prakash, I am trying to do the same thing in a stepped report where in I have a parent group and two child groups, I am not sure at which row group do I need to add the new group, it only gives me one row per page. Any ideas? Sri, you have to go the group you added and look under sort option and delete the expression from there.