Dear Team, according to our project requirement I need to calculate some statistical data.So I'm implementing the statistical documentation code from packages .when I'm executing the code a blank page with no error is getting appear on the screen.so could you please help me.
<?php
//MyReport.php
require_once "vendor/koolreport/core/autoload.php";
require_once "vendor/koolreport_pro-5.0.4/examples/load.koolreport.php";
use \koolreport\statistics\Statistics;
class myreport extends \koolreport\KoolReport
{
public function settings()
{
return array(
"dataSources"=>array(
"". $_SESSION['c_db'] .""=>array(
"connectionString"=>"mysql:host=". $_SESSION['sqlHost'] .";dbname=". $_SESSION['c_db'] ."",
"username"=>$_SESSION['sqlUserName'],
"password"=>$_SESSION['sqlPassword'],
"charset"=>"utf8"
),
)
);
}
function setup()
{
$this->src('tblname')
->pipe(new Statistics(array(
'min' => array('custEnquiryId'),
'max' => array('custEnquiryId'),
)))
->pipe($this->dataStore('result'));
}
}
<?php
//MyReport.view.php:
use \koolreport\widgets\koolphp\Table;
use \koolreport\statistics\StatisticsReader;
$stats = StatisticsReader::read($this->dataStore('result'));
echo $stats['max']['custEnquiryId'];
echo $stats['min']['custEnquiryId'];
?>