views:

108

answers:

1

I want to do the following:

Make a servlet which would sit in a servlet container. I would feed the jasper report definition xml to it, the parameters, plus the data for the report in CSV as POST data in HTTP request. The servlet would respond with the generated report file. I need this because I want to generate reports from my own python web application. And I don't want to expose my database to jasper server + I'm probably going to do more processing to the data from my own application.

Is this possible? If so, where should I begin? What classes from jasper reports should I consider using?

+1  A: 

This should help you get started

http://www.ensode.net/jasperreports_pdf_send_to_browser.html

In your case, you will have to create a JRCsvDataSource with your data and pass it to the JasperRunManager#runReportToPdf method instead of the JREmptyDataSource, along with any parameters and your report file.

gedim
Thanks, that helped.
Vasil