I have a simple Jasper Report created using Jaspersoft Studio 6.3.1 and I have couple of rectangle element with backcolor in it and also couple of line elements.
Now from my Java code, I am trying to generate report in different formats using JasperPrint and trying to generate PDF and MS Word (.docx) version of this report by passing datasource from there. This code runs successfully and generates PDF and docx versions, but those rectangle and line elements with backcolor are only visible in PDF version and not in MS Word version.
Is that a normal behavior or it is possible to get all that formatting in Word version as well? If yes, then can you please share code snippet to do that? I'm using following code to generate PDF and Word versions.
2 Answers:
It's a normal behavior with JasperReports for all Office document type exports.
You'll need to customize the exporter to make it work like I did with xls exporter.
http://community.jaspersoft.com/questions/968571/xls-export-missing-over...
Thanks for your answer, but sorry I didn't get that. How did you fix the xls issue? Basically is there any specific code which goes on Java side when we export and print the report in MS Word or fix is really in the .jrxml file at the design time?