How to MS Word sheet margin

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: 2 years 2 months ago

1 Answer:

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: 1 year 6 months ago

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

rino.covelli - 9 years 6 months ago

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

sjoerd.jump - 9 years 6 months ago

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

rino.covelli - 9 years 6 months 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 - 9 years 6 months ago

I would want to solve it jasper side

rino.covelli - 9 years 6 months ago

Dont think that your problem is on the jasperside.

sjoerd.jump - 9 years 6 months 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 - 9 years 2 months ago
Feedback