SSRS Limit Number of rows Per Page
Hi
I have 200 records in my report how do i get 20 in the first page only in my report and 30 for the rest of pages i'm using ssrs 2005
Please any help !
August 10th, 2011 4:15pm
Hi Hayawi,
Try this,
= IIf ( CInt(Globals!PageName) = 1, Ceiling((RowNumber(Nothing)) / 20), Ceiling((RowNumber(Nothing)) / 30) )
Thanks
KumarPlease do let us know your feedback. Thank You - KG, MCTS
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2011 4:28pm
Hi Again,
Try this,
1. Go to "Report" -> "Report Properties" -> "Code" , in the Custom Code section, enter the following:
Public Function PageNumber() as String
Dim str as String
str = Me.Report.Globals!PageNumber.ToString()
Return str
End Function
Public Function TotalPages() as String
Dim str as String
str = Me.Report.Globals!TotalPages.ToString()
Return str
End Function
2. Now create your Group with Page Break as below SSRS expression:-
= IIf ( CInt(Code.PageNumber()) = 1, Ceiling((RowNumber(Nothing)) / 20), Ceiling((RowNumber(Nothing)) / 30) )
Please let us know your feedback.
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTS
August 10th, 2011 4:55pm
Hi Hayawi,
We can achieve it easily with group expression to group data by each 20 records, and then we can add a page break Between each instance
of a group. The main steps are:
1.
Right-click the Tablix handle, select Properties.
2.
In Table Properties pane, navigate to Groups category. Add a group to the table and structure group expression as below to assign 20 records
for each group:
=Int((RowNumber(nothing)-1)/20).
Click the checkbox before Page break at end.
For more information about Group Expression, please refer:
http://msdn.microsoft.com/en-us/library/bb630426(v=SQL.110).aspx.
Thanks,
Lola
Please remember to mark the replies as answers if they help.
Free Windows Admin Tool Kit Click here and download it now
August 12th, 2011 4:18am