How to generate pdf file from jrxml and mysql

0

I want to generate report in pdf format. I need to use data from mysql database and use .jrxml for adding data to template.

I got reports using Jasper Studio. And I got a template in file format .jrxml.

At this moment I need to do similar process on linux server, using only terminal, without IDE and without Java projects

jedav's picture
2
Joined: Aug 13 2019 - 12:24am
Last seen: 1 month 1 day ago

1 Answer:

0

That's easy per Jasper API ....just

1.) load the jrxml and compile it to an JasperReport Object (or load directly the .jasper file instead) ,

2.) pass your connection and parameter to the FillManager and get an JRPrintObject out of the loaded template/report

3.) export the resulting JRPrint to a pdf-file

take a look into the samples provided in full JasperReports Project download zip file.

hth + regards

C-Box

C-Box's picture
1741
Joined: Jul 19 2006 - 5:58pm
Last seen: 2 days 18 hours ago
Feedback