KoolReport is an intuitive and flexible Open Source PHP Reporting Framework for faster and easier data report delivery.
KoolReport can work with any MVC Frameworks such as Laravel, CodeIgniter or Yii2 to provide reporting capability.
composer require koolreport/core
Create reports
folder in the root folder to hold reports. You may find our MyReport
sample report within reports
folder. The MyReport contains class file MyReport.php
and view file MyReport.view.php
...
public function actionReport()
{
$report = new \app\reports\MyReport;
$report->run();
return $this->render('report',array(
"report"=>$report
));
}
In the action of Yii2, we create report object, run it and then pass the report object to the view.
You may find the report.php
view with following content:
<?php $report->render();?>
http://localhost/yii2-example/web/index.php?r=site%2report
Happy Reporting!