KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Drilldown in DataTables #1025

Open Rajesh opened this topic on on Aug 1, 2019 - 2 comments

Rajesh commented on Aug 1, 2019

Hi Koolreport,

I have already implemented your table drilldown package which works pretty good. I was wondering if it is possible to implement the same on DataTables. I tried to use your DataTables package and changing the "Table" class to "DataTables" in the report.view.php file. After the change, I am able to see the first level Datatable which works fine but drilldown does not work on it. Could you please let me know if I need to make any other changes to make drilldown work on DataTables?

Thanks,

Rajesh.

Rajesh commented on Aug 7, 2019

Hi Koolreport,

Could you please respond to my question?

Thanks,

Rajesh.

David Winterburn commented on Aug 9, 2019

Hi Rajesh,

For drilldown to work we need to use a widget's client events. I think DataTables' event names are a bit different from Table. If you use row select for drilldown, please try the following code for DataTables' select event:

DataTables::create(array(
    ...
    "options" => array(
        ...
        "select" => true,
    ),
    "clientEvents"=>array(
        "select"=>"function(e,dt,type,indexes){
            //your drilldown code
        }"
    )
    ...

Let us know if this works for you. Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

DataGrid