Dear Support team, I am trying to install and run my first koolreport report on my PHP application(without any framework). I used the composer to install koolreport/core and trying to run the quick start report. My dev environment is WAMP based. Below is my directory structure installed by composer C:\wamp64\www\lp\vendor\koolreport\core My application structure
Below is the code for SalesByCustomer.php
<?php
//Specify some data processes that will be used to process
use \koolreport\processes\Group;
use \koolreport\processes\Sort;
use \koolreport\processes\Limit;
//Define the class
class SalesByCustomer extends \koolreport\KoolReport
{
protected function settings()
{
//Define the "sales" data source which is the orders.csv
return array(
"dataSources" => array(
"sales" => array(
"class" => 'datasources\CSVDataSource',
"filePath" => "orders.csv",
),
)
);
}
protected function setup()
{
//Select the data source then pipe data through various process
//until it reach the end which is the dataStore named "sales_by_customer".
$this->src('sales')
->pipe(new Group(array(
"by" => "customerName",
"sum" => "dollar_sales"
)))
->pipe(new Sort(array(
"dollar_sales" => "desc"
)))
->pipe(new Limit(array(10)))
->pipe($this->dataStore('sales_by_customer'));
}
}
ANY HELP WILL BE GREATLY APPRECIATED