How to MS Word sheet margin

0

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();
 
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,pathFile);
    exporter.setParameter(JRExporterParameter.JASPER_PRINT,reportFilled);
    exporter.exportReport();

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?

 

 

 

rino.covelli's picture
Joined: Sep 27 2013 - 12:44am
Last seen: 5 years 3 months ago

1 Answer:

0

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.

sjoerd.jump's picture
Joined: Oct 29 2012 - 2:39pm
Last seen: 4 years 10 months ago

I'm using the default setting in IReport. My IReport page is 842x595 and the margins are 20.

rino.covelli - 6 years 1 month ago

Is there an overflow on a cell that is bigger than your margin when generated?

sjoerd.jump - 6 years 1 month ago

I don't think, why this happened also with a blank tempate.

rino.covelli - 6 years 1 month ago
show 4 more...

How about this solution?
Sounds like its on the "word" side of the export

http://support.microsoft.com/kb/314568

sjoerd.jump - 6 years 1 month ago

I would want to solve it jasper side

rino.covelli - 6 years 1 month ago

Dont think that your problem is on the jasperside.

sjoerd.jump - 6 years 1 month ago

Hello ,

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.

tanguy.yves - 5 years 9 months ago
Feedback