Dear friends, I'm building a report using JasperReport 5.0.0 and IReport 5.1.0. Now my trouble is that when i try to export a docx file through DocxExporter,t I can't set margins of sheet.
I'm exporting the document in this way:
JasperReport reportCompiled = JasperCompileManager.compileReport(pathJrxmlFile);
JasperPrint reportFilled = JasperFillManager.fillReport(reportCompiled, null, dataSource);
JRDocxExporter exp = new JRDocxExporter();
but this doesn't work. And then when i try to print if from MS word i get this message "margins of section 1 are set outside the printable area of the page".
Where do I wrong?
Is your page in iReport the same size as the A4 format?
default settings of the iReport page are: 842 x 595
default margins are 20 20 20 20.
Cross check this with your Word. There might be a conflict there.
I'm using the default setting in IReport. My IReport page is 842x595 and the margins are 20.
Is there an overflow on a cell that is bigger than your margin when generated?
I don't think, why this happened also with a blank tempate.
How about this solution?
Sounds like its on the "word" side of the export
I would want to solve it jasper side
Dont think that your problem is on the jasperside.
I am facing this issue as well and so far no solution found even with migration from iReport 5.0.1 to 5.1.0 release.
In addition recurrent problems are still there with 5.1.0 : docx document is seen like a set of pages made of tables
that is probably the reason of bad printing.
Thus has someone already been able to export and generate a real docx document ?
Best regards, Yves.