Dear support team,
I just have tried to connect to my MSSQL Server 2008 R2 in the same company network from my XAMMP environment on a Windows10 PC as followed (via SQLSRVDataSource):
Remark: I have a correct connection from the same environment to my MSSQL Server within an other blank PHP application. So the needed drivers should be available on this machine.
<?php require_once "koolreport/autoload.php"; use \koolreport\processes\Group; use \koolreport\processes\Sort; use \koolreport\processes\Limit;
class SalesByCustomer extends \koolreport\KoolReport {
public function settings()
{
return array(
"dataSources"=>array(
"mysql"=>array(
'host' => '10.100.65.21',
'username' => 'sa',
'password' => '*************',
'dbname' => 'NIKON_AutoRep_test',
'charset' => 'utf8',
'class' => "\koolreport\datasources\SQLSRVDataSource"
),
)
);
}
public function setup()
{
$this->src('sales')
->query("SELECT NikonOrt,Umsatz FROM Reporting.autorep_v WHERE NikonOrt = 'Ahlen' AND Umsatz > 0")
->pipe(new Group(array(
"by"=>"NikonOrt",
"sum"=>"Umsatz"
)))
->pipe(new Sort(array(
"Umsatz"=>"desc"
)))
->pipe(new Limit(array(10)))
->pipe($this->dataStore('autorep_v'));
}
}
The error message is:
"Fatal error: Uncaught Exception: Datasource not found 'sales' in C:\xampp\htdocs\AutoRep_Nikon\koolreport\KoolReport.php:188 Stack trace: #0 C:\xampp\htdocs\AutoRep_Nikon\SalesByCustomer.php(27): koolreport\KoolReport->src('sales') #1 C:\xampp\htdocs\AutoRep_Nikon\koolreport\KoolReport.php(31): SalesByCustomer->setup() #2 C:\xampp\htdocs\AutoRep_Nikon\index.php(4): koolreport\KoolReport->__construct() #3 {main} thrown in C:\xampp\htdocs\AutoRep_Nikon\koolreport\KoolReport.php on line 188"
Any idea what could be the reason?
Kind regards, bysystem