Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use a Microsoft Word file as a report template for JasperReports?

I have several model contracts in Microsoft Word files with as many as 20 pages per file). I would like to use Jasper Reports to fill out these contracts.

I tried importing the doc file into iReport, but that is not working.

Is there a way to convert a Microsoft Word file to a JasperReport template?

like image 477
khadher Avatar asked Oct 15 '25 19:10

khadher


1 Answers

Try to convert the doc into excel and than use the excel as datasource in ireport.

Edit: Based on OP's comment.

You can not use a Microsoft word file as a JasperReport template. You will need to create a JRXML file for JasperReports. It is possible to use rtf or html as source for text fields but the final formating of such field is rather pure.

Your other option is to not user JasperReports and manipulate the Microsoft Word files directly using Apache Poi.

like image 126
Josef Procházka Avatar answered Oct 17 '25 11:10

Josef Procházka