Jump to content

page_number problem


Recommended Posts

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 blank

Can somebody help me on how to fix this bug?

Thanks in advance.


Post edited by: sunxh, at: 2006/08/02 12:34

Post edited by: sunxh, at: 2006/08/02 12:36

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic



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.


Link to comment
Share on other sites

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

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);


JasperPrint jasperPrint = JasperFillManager.fillReport(reportFile.getPath(),parameters,conn);


Why JRFileVirtualizer interrupt page_number?


Post edited by: sunxh, at: 2006/08/11 04:08

Link to comment
Share on other sites

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.




Link to comment
Share on other sites

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...