Jump to content
Changes to the Jaspersoft community edition download ×

Bold does not work in Microsoft Word with docx extension


fernando.henrique.miara

Recommended Posts

I have a Java application using Jasper version 6.17.

Any docx file made with Jasper layout when opened in Microsoft Word, the bold does not work, could anyone help me?

Java:

JasperReport jasperReport = JasperCompileManager.compileReport(caminhoRelatoriodocx +"/mrp/ataZero.jrxml");
        JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource());
        JRDocxExporter exporter = new JRDocxExporter();
        SimpleDocxReportConfiguration configuration = new SimpleDocxReportConfiguration();
        configuration.setFramesAsNestedTables(false);
        configuration.setFlexibleRowHeight(true);
        configuration.setIgnoreHyperlink(false);
        exporter.setConfiguration(configuration);
        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(response.getOutputStream()));
        response.setHeader("Content-Disposition", "attachment;filename="+fileName);
        response.setContentType("application/octet-stream");
        exporter.exportReport();

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

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