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/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.