Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi Jure,
Here is the sample code to get DrillDown take into account the dateRange or any other inputs.
<?php
DrillDown::create(array(
"scope"=>array(
"dateRange"=>$this->params["dateRange"]
),
"dataSource"=>function($scope)
{
return $this->src("mydb")->query("
select * from table where date in (:range)
")->params(array(
":range"=>$scope["dateRagge"]
));
},
...
));
?>
So as we see in here, the "dateRange" parameter will be saved in to $scope of drilldown and be used inside "dataSource" property. The dataSource is declared as function and in there you can use the $scope to change the query.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo