i have problem with my excel when i print preview the files after i export the report into excel. How to setup the files when i print the files, it will automatic fix the size according the A4 paper?.
相关问题
- Jasper: error opening input stream from url
- JasperReports Server parameter dependency
- is it possible print element only when its detail
- JasperReports CompileReport
- Print an arraylist content with JasperReports
相关文章
- How to set up jasper reports in spring with subrep
- Modularization of Jasper reports: Pass data source
- How to use jasperreports subreports with grails ja
- Current URL /web/guest/HTML generates exception: n
- SAX2 driver class not found
- Passing array data from PHP to JasperReports (with
- How to force image url in jasper report export to
- SubReport not shown
I had this problem as well: Exporting to Excel and opening a Print preview did not show
A4
butLetter
, despite the report page format being configured as A4 (that is 842 * 595 pixels).During Excel export, Jasper calculates and sets the paper size in the
private final short getSuitablePaperSize()
method ofnet.sf.jasperreports.engine.export.JRXlsExporter
(as of JasperReports 6.2.0).The calculation did not work correctly because the
JRParameter.IS_IGNORE_PAGINATION
flag was turned on. With this flag, Jasper considers the entire report as one single page, so page size and page width are not anymore the same as defined in the report's page format.Leaving
JRParameter.IS_IGNORE_PAGINATION
atfalse
produced the correct print preview (in A4).