nosferatum Posted June 1, 2007 Share Posted June 1, 2007 subj Link to comment Share on other sites More sharing options...
arunvishvin Posted June 1, 2007 Share Posted June 1, 2007 please elaborate your requirement...since it is not clear Link to comment Share on other sites More sharing options...
nosferatum Posted June 1, 2007 Author Share Posted June 1, 2007 The real problem is that I want my report to fill ONLY ONE page. So I have to know how many pages do it fill, and when it's more than 1, I have to decrease the font size of the subreports. Link to comment Share on other sites More sharing options...
szaharia Posted June 1, 2007 Share Posted June 1, 2007 The most common way to know your number of pages, is to obtain a JasperPrint object from your source report, and to get the JasperPrint object's number of pages. For example:Code:JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);int numberOfPages = jasperPrint.getPages().size(); Regards,sanda Link to comment Share on other sites More sharing options...
nosferatum Posted June 3, 2007 Author Share Posted June 3, 2007 10X a lot! But it seems to work not perfect - if the report has 1 page - 2 is returned, 2 pages - 3 returned etc. (real_number_of_pages + 1). However, never mind.Post edited by: nosferatum, at: 2007/06/03 09:37 Link to comment Share on other sites More sharing options...
szaharia Posted June 4, 2007 Share Posted June 4, 2007 hummm, that sounds a little bit weird.Could you send us a sample report having this behavior? Thank you,sanda 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