Jump to content
Changes to the Jaspersoft community edition download ×

How to generate pdf file from jrxml and mysql


jedav

Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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