Jump to content
Changes to the Jaspersoft community edition download ×

Fixed record number on every page?

2004 IR Help

Recommended Posts

By: Jim Yin - xpdz

Fixed record number on every page?

2005-06-26 23:04

Hi all,


How to display fixed number of records on each page?

e.g. I want dispaly 10 records per page.


I know the only method to introduce a page break is using group(with isStartNewPage=true), but I don't know how to write the groupExpression.


Maybe this question have been asked, I searched but cann't find the solution.











By: C-Box - c-box

RE: Fixed record number on every page?

2005-06-26 23:18

I remember having read something similiar some months ago....

try to use an expression like this:


$V{REPORT_COUNT} mod 10 == 0 (just from mind, no correct syntax)


where $V{REPORT_COUNT} is a builtin-variable holding the current number of record.


not tried... but should work. :-)








By: Jim Yin - xpdz

RE: Fixed record number on every page?

2005-06-27 19:37

thanks the reply

I have tried the groupExpression like this:

new Boolean($V{REPORT_COUNT} % 10 == 0)

but which will dispaly 9 rows in first page, then 1 row in second page, then 10 rows in 3rd, 1 in 4th, etc.

I think this because of grouping will happen while the engine encounter the expression value is changed.


Now, I got a workround way:

I Assume I want to 10 rows in each page, the page size is A4 and each field height in detail is 20, so I can calculate all of the bands height, I let the pageFooter take all the rest height.

The problem is solved.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...