I'm using the instructions at https://www.koolreport.com/examples/reports/datasources/csv_report/ to build a website with a csv file. I've taken some liberties as to what the CSV is and what it contains, but as far as I know that's not where the error is coming from. When loading the website, i get the error
Fatal error: Class 'koolreport\core\Utility' not found in [projectpath]/koolreport/core/src/KoolReport.php on line 140
I'm not sure if its because of my project structure or something in my code, but I haven't found anything that has made this problem any clearer. My php file includes the following:
<?php
require_once "koolreport/core/src/KoolReport.php";
use \koolreport\core\src\KoolReport;
use \koolreport\core\src\processes\Filter;
use \koolreport\core\src\processes\TimeBucket;
use \koolreport\core\src\processes\Group;
use \koolreport\core\src\processes\Limit;
use \koolreport\core\src\core\Utility;
class PaymentReports extends \koolreport\KoolReport{
public function settings(){
return array(
"dataSources"=>array(
"payment_reports"=>array(
"class"=>'\koolreport\core\src\datasources\CSVDataSource.php',
'filePath'=>dirname(__FILE__)."/AgentPaymentReports.csv",
)
)
);
}
protected function setup(){
$this->src('AgentPaymentReports')
->pipe(new TimeBucket(array(
"payment_date"=>"month"
)))
->pipe(new Group(array(
"by"=>"payment_date",
"sum"=>"amount"
)))
->pipe($this->dataStore('sale_by_month'));
}
}
?>
If you'd like to see my CSV file or how my project is structured, I would be more than happy to send it. Thanks in advance!