-
Notifications
You must be signed in to change notification settings - Fork 23
Birt integration
Some background first.
http://php-java-bridge.sourceforge.net/pjb/ is a great project it allows PHP be be used in the fron end - like so many web sites or web applications. But allows it to call Java objects and methods from PHP. This opens us up to the world of some very mature products only available in the Java world.
Such as a report engine.
This add-on will allow you to write a report using the BIRT markup, then run from your P4a application. It will parse the report for any parameters required for the report and prompt the user for them before generating the rendered report.
First install the java bridge. There are some good examples on what to do - but there where a couple of gotchas which got me.
-
Install Sun Java, and make sure it is the default. BIRT didn't even work on the open source version. Also watch out, if you install the Sun version you might need to switch the alternitvae for it - this is very dependant on the Linux(or other) ditro you are using.
-
Use Tomcat 6 (5.5 had all sorts of problems with the java bridge) - use the tar balled version - unpack and just run the startup.sh in the bin directory. When running place the BIRT war file in the web apps directory.
-
If you use the BIRT report writer which comes as part of eclipse, this is a later version than the currect version bundled with PHP java bridge. When you save a report simply switch to xml mode and set the version to a lower version - this worked for me.
-
There is currectly a bug:(, in IE when you set the format type to anything other than HTML the browser does not like something in the format (possible the headers) - it works in Mozilla. If anyone could let me know what I have done wrong that would be great!
- Report.php should go in the P4A Application root. Report.php is a file which allows a new window to access and download the full raw report – i.e. pdf, xls and so on. This is called from the report popup and when a user clicks the view report button - this is the file called.
- Birt, report_popup and runreport all go in the objects directory – I put them in a sub directory.
- Birt is simply an object interface to the BIRT backend.
- Report popup presents parameters for the report and choose the output format. The output (i.e. raw data is put into a session variable ready for report.php).
- Runreport simply uses a database table to hold pointers to all the available reports to run – including the ability to upload reports.
General:
Documentation:
Theme customizations:
Contribs: