2006 JR Open Discussion Posted August 22, 2006 Share Posted August 22, 2006 By: Painter - torlh About page number 2006-03-16 23:54Hello, My name is Curt Huang. I have a question here. In JasperReport 0.6.0, we can have batch export using parameter JRExporterParameter.JASPER_PRINT_LIST. After we export three reports which contains page number to one file, the file still keeps the original page numbers of each report. I suggest this exported file may generate the page numbers again for all pages. Thus all pages in the exported file has continus page numbers. Thank you! Curt By: jasperkan - jasperkannan RE: About page number 2006-03-17 09:48Its not clear wht you mean here ? do u mean that if a report has subreports , then page number of the subreport should be continous ? I think the subreport page number is independent of the main report ,so it starts again from 1 . To solve this, We are passing PAGE_NUMBER as a parameter to the subreport and using it to set page numbers . By: Painter - torlh RE: About page number 2006-03-22 19:02Hi, Let me clarify my question here. For example, in the demo sample,"batchexport",we have three jrxml files(Report1,Report2 and Report3) which has their independent page number. After we use the JASPER_PRINT_LIST parameter to combine the three reports and export to one file like PDF. The page numbers in the exported file has original numbers from the three report files which are not a series. I think sometime we may need to change page numbers in the exported file such that we can have continous page numbers in the exported report file. Link to comment Share on other sites More sharing options...
nnvc Posted October 22, 2009 Share Posted October 22, 2009 Hi to all!!I have the same problem!I am using JASPER_PRINT_LIST and the page number of the report is not continuous.Do you have any idea how to solve this? Thank you !!! Link to comment Share on other sites More sharing options...
zakjodevelopper Posted November 9, 2009 Share Posted November 9, 2009 Hi! I have the same problem and i need your help! It's very urgent. Does anyone find a solution to get the correct page number? Thanks! Link to comment Share on other sites More sharing options...
nnvc Posted November 20, 2009 Share Posted November 20, 2009 Hi!!I did manage it, i hope it can help you. I had two reports, one with data(reportA) and another with a chart(reportB), and each one has its own pages.I obtained the jasperPrint of the report A.with the jasper print i already know the number of pages of the reportA.I already know that the reportB has only one Page, so I send aparameterMap.put("totalPage",String.valueOf((jasperPrint.getPages().size()+1)));In the jrxml of the reportB I created a parameter totalPage, and used it to display the pages.I show the pages like 1 / 3 for example,and the text field expression is(($P{totalPage}.length() == 0)?(" " + $V{PAGE_NUMBER}+ " "):(" " +$P{totalPage})+ " ")In my case i use the reportB with other reports also, wich means that if send 0 in totalPage then its also ok.the evaluation time is different, for the 1 is "now", and for the 3 the evaluation time is Report.My reportA is in portrait and the reportB in Landscape and it works fine.I hope it helped you. Post Edited by nnvc at 11/20/2009 11:20 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