MohanRao Posted January 19, 2007 Share Posted January 19, 2007 Hello, Is there any option of setting the 'results per page' option in iReport? If yes, please let me know. I could find the resPerPage in Pagination class. But could not get where to set the number of results per page. Please help me. Thanks,Mohan. Link to comment Share on other sites More sharing options...
jmurray Posted January 19, 2007 Share Posted January 19, 2007 There is no such setting in iReport. You could potentially manipulate the resPerPage via a scriptlet. But you could also achieve this using groups as there is a "Start on a new page" parameter in the group settings. In your source query you would configure a new group field based on rownumber. An Oracle example that limits the number of records per page to (say) 35 would be something like this: select trunc(rownum/35) as myGroup, first_name, last_name from turbine_user MySQL is a little different in that it doesn't have any concept of rownum. It needs something more like this: SELECT floor((@rownum:=@rownum+1)/35) as myGroup, t.* FROM (SELECT @rownum:=0) r , (SELECT AccountName from DigiToll.Account) t Link to comment Share on other sites More sharing options...
yongchun Posted January 24, 2008 Share Posted January 24, 2008 jmurray wrote:There is no such setting in iReport.You could potentially manipulate the resPerPage via a scriptlet.But you could also achieve this using groups as there is a "Start on a new page" parameter in the group settings.In your source query you would configure a new group field based on rownumber. An Oracle example that limits the number of records per page to (say) 35 would be something like this:select trunc(rownum/35) as myGroup, first_name, last_name from turbine_userMySQL is a little different in that it doesn't have any concept of rownum. It needs something more like this:SELECT floor((@rownum:=@rownum+1)/35) as myGroup, t.* FROM (SELECT @rownum:=0) r , (SELECT AccountName from DigiToll.Account) t Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now