Dear koolreport support team,
first of all thx a lot for this great tool!
I have a test XAMMP environment on a Windows10 PC running with apache and MySQL.
I started with the basic example and but the first run of index.php brings the following error message:
"Fatal error: Uncaught Error: Class 'Sort' not found in C:\xampp\htdocs\AutoRep_Nikon\SalesByCustomer.php:30 Stack trace: #0 C:\xampp\htdocs\AutoRep_Nikon\koolreport\KoolReport.php(31): SalesByCustomer->setup() #1 C:\xampp\htdocs\AutoRep_Nikon\index.php(4): koolreport\KoolReport->__construct() #2 {main} thrown in C:\xampp\htdocs\AutoRep_Nikon\SalesByCustomer.php on line 30"
If I comment out the the section -->pipe (new Sort ... and -_>pipe(new Limit... in "SalesByCustomer.php" then the report will be generated fine (of course without sorting and limit functionality :-( <?php require_once "koolreport/autoload.php"; use \koolreport\processes\Group;
class SalesByCustomer extends \koolreport\KoolReport {
public function settings()
{
return array(
"dataSources"=>array(
"sales"=>array(
"connectionString"=>"mysql:host=localhost;dbname=nikon_autorep_test",
"username"=>"root",
"password"=>"",
"charset"=>"utf8"
)
)
);
}
public function setup()
{
$this->src('sales')
->query("SELECT KdOrt,Umsatz FROM autorep_v")
->pipe(new Group(array(
"by"=>"KdOrt",
"sum"=>"Umsatz"
)))
/*
->pipe(new Sort(array(
"Umsatz"=>"desc"
)))
->pipe(new Limit(array(10))) */
->pipe($this->dataStore('autorep_v'));
}
}
My folder structor is as follows: C:\xampp\htdocs\AutoRep_Nikon
--> examples/
--> koolreport/
example.css
index.php
SalesByCustomer.php
SalesByCustomer.view.php
Any hint for me to fix this?
Kind regrds, bysystem