Search code examples
phpsymfonycrystal-reportsjasper-reportsreporting

How can I create complex reports with PHP / Symfony2?


I need to create large and complex reports (with graphs, images, pagination, headers and footers, etc) from my Symfony 2 application.

I've been searching the web, looking for Symfony or PHP complete report generators (like Crystal Reports, Report Builder or JasperReports), but I haven't found anything. The only thing I've found are some libraries to generate PDF's from PHP, and the wkhtml2pdf tool.

Is there any reporting tool for Symfony 2 or, at least, for PHP? Or must I use JasperReports and search or write any plugin to call Jasper from Symfony? I haven't deployment constraints because I have my own VPS (no shared server), so I have root access.


Solution

  • For a "pure" PHP solution, you can use PHPJasperXML, which renders Jasper Reports natively into PHP, so you don't need to setup Java and a bridge for PHP, there are some limitations as this is not an official implementation, but it's pretty useful nonetheless.

    By the way, the reports can be created with IReport, and then simply used on PHPJasperXML.