sunxh Posted August 2, 2006 Share Posted August 2, 2006 I have a design which contains pageHeader band,detail band and build 2 groups I placed $V{page_number}(evaluation time now) and $V{page_number}(evaluation time report) both set "Print repeated values" in pageHeader.For first group I've set: "Start on a new page", and "Print header on each page". another one set "Print header on each page" I used IReport interface run this report with a connection export pdf file,it works perfactly,both Page_number were displayed, but when I run same report in jsp, Page_number(report) only display once in a page,the other pages were blankCan somebody help me on how to fix this bug?Thanks in advance. Post edited by: sunxh, at: 2006/08/02 12:34Post edited by: sunxh, at: 2006/08/02 12:36 Link to comment Share on other sites More sharing options...
sunxh Posted August 3, 2006 Author Share Posted August 3, 2006 P.S.I use jasperreports 1.0.2any suggest? Link to comment Share on other sites More sharing options...
teodord Posted August 3, 2006 Share Posted August 3, 2006 Hi, I suspect that when deployed as a JSP, you are probably running on a different machine that does not offer the same environment. Maybe the fonts you are using in the report template do not exist on that server machine and probably a bigger font is used and the text for total page number would not fit into the declared text height.Try making the text field taller (increase height). If this is exactly what happens, then you need to do something about the missing fonts. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
sunxh Posted August 4, 2006 Author Share Posted August 4, 2006 Thanks for your suggest!!I increase the textfile size but still have the problem,in some other reports those not have such groups page_number display normally,I wonder how dose group interrupt page_number..I post this template in attach for everybody can run this report.Thanks for help:) [file name=DistributorListing.jrxml size=65260]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/DistributorListing.jrxml[/file] Link to comment Share on other sites More sharing options...
sunxh Posted August 8, 2006 Author Share Posted August 8, 2006 Thanks Thanks Thanks Link to comment Share on other sites More sharing options...
sunxh Posted August 11, 2006 Author Share Posted August 11, 2006 I've got it,The problem is the parameter pass to jasperreports~~parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);JasperPrint jasperPrint = JasperFillManager.fillReport(reportFile.getPath(),parameters,conn);Delete this parameter,reports works perfectly. new problem is How to add a virtualizer to reports exactly? I use JRFileVirtualizer just like jasperreports Demo: JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, tmp_path); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); virtualizer.setReadOnly(true); JasperPrint jasperPrint = JasperFillManager.fillReport(reportFile.getPath(),parameters,conn); Why JRFileVirtualizer interrupt page_number?ThanksPost edited by: sunxh, at: 2006/08/11 04:08 Link to comment Share on other sites More sharing options...
lucianc Posted August 11, 2006 Share Posted August 11, 2006 The problem with your use of a virtualizer is that you switch the virtualizer to read-only mode before you fill the report. Setting the virtualizer to read-only mode should be done after all the data managed by the virtualizer (in this case, the filled report) is final and not expected to change any more. HTH,Lucian Link to comment Share on other sites More sharing options...
sunxh Posted August 16, 2006 Author Share Posted August 16, 2006 Thanks,I've know how to use virtualizer I really appreciate your help :laugh: 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