views:

227

answers:

2

Our system is written completely in PHP.
For various business reasons (which are a given) I need to build the reports of the system using JasperReports.
What architecture should I use? Should I put the Jasper as a stand alone server (if possible) and let the php query against it, should I have it generate the reports with a cron, and then let the PHP scoop up the files and send them to the web client/browser...

A: 

JasperServer seems to be the best option, having:

Comprehensive Web Services, Java, and HTTP APIs, as well as support for Web Services from non-Java environments such as .NET (C#), C++, and PHP

Another option is to implement something like that yourself, with only the functionality you need. Make a separate java web-app that generates the reports, using either web-services or REST to communicate with it.

Bozho
A: 

If you like to keep things simple and "free", then i recommend:

  • Build your own small Java webapp.
  • Use DynamicJasper to build customized reports.
  • Expose a web service from the Java app, and call it from your PHP.
  • Java app will reply with a PDF file.
medopal
instead of web service, I assume I can also use a simple iframe, correct?
Itay Moav