Hi, I received this error:
The version of PHP and OS is: PHP 7.4.33 and Windows 10
Can someone help me?
This is my SalesByCustomer.php file: <?php
require_once "../koolreport/core/autoload.php"; require_once "../configBancoDados/config_db.php";
class SalesByCustomer extends \koolreport\KoolReport {
protected function settings()
{
global $host_bd, $nome_bd, $usuario_bd, $senha_bd;
return array(
"dataSources"=>array(
"mysql_datasource"=>array(
"connectionString"=>"mysql:host=$host_bd;dbname=$nome_bd",
"username"=>"$usuario_bd",
"password"=>"$senha_bd",
"charset"=>"utf8",
),
"sales"=>array(
"class"=>'\koolreport\datasources\CSVDataSource',
"filePath"=>"orders.csv",
),
)
);
}
protected function setup()
{
global $nome_bd;
$this->src('mysql_datasource')
->query("SELECT customerName, dollarSales FROM $nome_bd.orders")
->params(array(":status"=>"completed"))
->pipe($this->dataStore('salesByCustomer'));
}
}
And here is my SalesByCustomer.view.php file:
<?php use \koolreport\widgets\koolphp\Table; use \koolreport\widgets\google\BarChart; ?>
Sales By Customer
This report shows top 10 sales by customer