I am working on the first tutorial. Did all the coding and then in my log file I find this:
[30-Oct-2018 00:17:34 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Datasource not found 'openemr'' in C:\ampc_wamp\www\OpenEMR\vendor\koolphp\koolreport\koolreport\KoolReport.php:210
Stack trace:
#0 C:\ampc_wamp\www\OpenEMR\vendor\koolphp\koolreport\employeelist\employeelist.php(29): koolreport\KoolReport->src('openemr')
#1 C:\ampc_wamp\www\OpenEMR\vendor\koolphp\koolreport\koolreport\KoolReport.php(39): EmployeeList->setup()
#2 C:\ampc_wamp\www\OpenEMR\vendor\koolphp\koolreport\employeelist\index.php(9): koolreport\KoolReport->__construct()
#3 {main}
thrown in C:\ampc_wamp\www\OpenEMR\vendor\koolphp\koolreport\koolreport\KoolReport.php on line 210
require_once "../koolreport/autoload.php"; require_once "../../../../interface/globals.php";
class EmployeeList extends \koolreport\KoolReport {
function settings()
{
return array(
"dataSources"=>array(
"mydata"=>array(
'connectionString' => 'mysql:host=localhost;dbname=openemr',
'username' => 'user_local',
'password' => 'ABZAn92nbJZwn2',
'charset' => 'utf8',
)
)
);
}
function setup()
{
//parent::setup(); // TODO: Change the autogenerated stub
$this->src("openemr")
->query("select id,fname,lname, from users")
->pipe($this->dataStore("employees"));
}
}
I have this framework nested inside of OpenEMR. I have been developing for OpenEMR for years. Any ideas as to why the example code is giving me this issue? Would have been nice to have the first crack at framework actually work but can't have everything smooth.