Rii - Report Generator Tool

Hi everyone, Don’t you think that php need a decent tool to create reports? I came from a vb6/delphi/asp.net/java environment,… and the only thing I really miss when I’m working with php is a good tool to build reports… every language I have mention before count with amazing tools like active report/crystal report/birt/jasper report/etc… I use for php TCPDF lib but let’s face it! is a hell… :(

What would happen if Yii include a basic Report Helper/Builder that uses AR (in Gii module style)??

Thanks Yii Team for such amazing framework…! B)

Some Features:

  • Query Builder -> AR

  • Templates -> header, footer, detail (SingleColumn, MultiColumn, Tabular), Sections, page#, title, autor, Etc

  • Export -> PDF, Excel, CSV, TXT, XML

  • Fields Operations -> Filter, Group, Sort ASC/DESC, Count(), Avg(), Sum(), formatting, (Criteria? Hide: Show)

  • Links to Drill-Down

  • Embed Graphs / Images / Sub-Reports

I agree.

But the missing reporting tool is not an Yii issue, it’s a generally PHP problem.

I didn’t found a solutiong since years … :frowning:

An effort was PHPJasperXML but still in beta, and seems it will stay in this state.

There exists an Yii-extension for this: ireport

but I don’t think it’s ready for a production enviroment …

Still waiting for a real PHP reporting solution, otherwise I think I will use java and jasper report.

I partially agree about that, Zend framework in deed stop there, but Yii provide code generators.

If you can generate forms (input) why not reports (output)?..

As I mention before, I can create reports but I want a full object oriented way to do that common task (the Yii way).





$this->widget('rii.widgets.CReportTabular', array(

  'dataProvider'=>$model->search(),

  'output' => 'pdf',

  'orientation' => 'portrait',

  'pagination'=>true,

  'style' => array(

         'mode'=>'embed',

         'height'=>320,

         'width'=>400,

        ),

  'title'=>'Customer Report',

  'template'=>'detail_view',

  'columns'=>array(

...


<div class="report">

  ...

</div>




There are a lot of experts in the community; at least one of them may have a solution…!! Or we must accept the limitation of php?

Hi,

I am facing the same problem and am at a loss concerning this report issue. Can anybody please give me a hint how you build reports in php? Also, what is the best way to print documents like invoices, quotations and other various documents that need to be issued to customers in a commercial software? Thanks

There’s another extension to integrate Jasper reports (iReport) with PHP: jasphp.

ericmaicon startet to port the Java-Code to PHP, but it’s a lot of work and in alpha state.

I now have installed the ‘original’ JasperReport Server and iReport and next time I will try the report-handling with the PHP/SOAP-Interface.

Hi,

I agree that PHP doesn’t have a decent reporting tool yet. I’m working on an implementation, that at my office several projects are already using and we are happy with the results.

It’s based in XSLT to consume your data, that must be given as XML and produces a XSL-FO report. Which get’s processed by the proper Renderer class (PDF, HTML, anyone you want to add…). The PDF are perfect thanks to ApacheFOP. All this workflow is handled by the reporting tool. Which you can consume in your PHP client class with 2 lines of code.

As a templating engine, we use MS Word, save docs as Word XML 2003 and process them with a modified version of Word2FO.xsl stylesheets, which instead of rendering an identical FO document, renders an XSLT that, if processed again, with input data XML, generates the XSL-FO report.

So far, it’s a symfony 1.4 plugin, we already use an unreleased sf2 bundle. and I plan to make a standalone component soon.

Here you have the project links

Here is the project page:

github.com/juanmf/sfPlugins/tree/master/reportPlugin

Here is the HowTo create templates with Word:

github.com/juanmf/sfPlugins/blob/master/reportPlugin/doc/HowToReport.pdf?raw=true

Hope you can manage to give it a try, once you installed it it’s really easy to use and very powerful.

Cheers, any feedback is welcome.

Juan

Reporting feature in Yii is one of thousands feature every web developer has been dreaming of. I’m sure this feature will be a solution for every Yii-application.

Thanks for great effort and amazing framework!