Hi KoolReport team,
I am Koolreport Pro User. I am using Codeigniter3, SqlServer to generate Reports...
Here my Database name is "MainiDM", I configured in database.php also. This is only one database in my project. Now I want to generate DrillDown with Example that given in Koolreport examples. But I changed my database name as "MainiDM" and table is "sampledata". I implemented same as example. But it gave the error as "Datasource not found 'MainiDM'"....Report is not generating. Please help me. I have to complete this task as early as possible....Thank You
Here is my code
DrillDown::create(array(
"name"=>"saleDrillDown",
"title"=>"Sale Report",
"levels"=>array(
array(
"title" => "All Years",
"content" => function($params,$scope){
ColumnChart::create(array(
"dataSource"=>(
$this->src("MainiDM")->query("SELECT YEAR(paymentDate) as preyear,sum(amount) as sale_amount
FROM sampledata
GROUP BY YEAR(paymentDate)")
),
"columns"=>array(
"year"=>array(
"type"=>"string",
"label"=>"Year",
),
"sale_amount"=>array(
"label"=>"Sale Amount",
"prefix"=>"$",
)
),
"clientEvents"=>array(
"itemSelect"=>"function(params){
saleDrillDown.next({year:params.selectedRow[0]});
}",
)
));
}
),