Overview #

As you may know, to start a report, we normally need 3 files: a controller class file(ex.MyReport.php), a view file (ex. MyReport.view.php) and a initiation file (index.php). The SinglePage allows us to create report in just one file, bundling all the controller, view and initiation file into one. Please view below example:

require_once "../../../koolreport/core/autoload.php";

use \koolreport\querybuilder\DB;
use \koolreport\widgets\koolphp\Table;

class MyReport extends \koolreport\KoolReport
    use \koolreport\instant\SinglePage;
    use \koolreport\clients\Bootstrap;
    function settings()
        return array(

    function setup()

$report = new MyReport;


<?php $report->end(); ?>

As you may see from above example, we only have 1 file index.php containing controller classes MyReport and the view inside the start() and end() methods of report. We declare use \koolreport\instant\SinglePage; inside MyReport to provide two important methods above.

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.