KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

Drilldown Table, Disable Click on header #1355

Closed PT. Four Best Synergy opened this topic on on Mar 23 - 5 comments

PT. Four Best Synergy commented on Mar 23

I've created drilldown using Table::create. It works, but when i click the header. it take the selected value of the header and continue the drilldown.

for example.

No | month | value

data [ {'1 ', '1', '1000'}, {'2', '2', '3000'}, {'3', '3', '5000'} ]

so,when i click in the data row. it will drilldown to another table with a correct parametes of month( 1 , 2 or 3 ). but i able to click on the header,and it drilldown to another table with string parameters month. how i disable the header so it can not be click and not redirect to another drilldown.

i can do it with javascript. so when the parameters is string, it wont be drilling down. but it's not a good approach. i rather disabled it.

        "title"=>"Laporan Data Payment Sales Method",
                "title"=>"Payment Sales",
                                SELECT  extract(year from tanggal) as jp, count(id) as total_trx, sum(nilai) as nilai, sum(disc) as disc, sum(revenue) as revenue, (SELECT round((sum(revenue::decimal)/(select sum(revenue) from data_sales_spk)*100),2)) as persen
                                fROM data_sales_spk
                                GROUP BY jp
                                ORDER BY jp")
                                    "label"=>"Total Trx"
                                    "label"=>"Nilai Penjualan"
                                    "label"=>"Nilai Diskon"
                                    "label"=>"Nilai Revenue"
                                    "formatValue"=>"@value %",
                            "table"=>"table table-hover table-tr"
KoolReport commented on Mar 23

This is considered as a bug, here is the fix: Please go to line 19 of koolreport/core/widgets/koolphp/table/table.js and make change to:

$('#'+this.name+" tbody tr").on('click',function(event){

This will trigger rowClick only for tr inside tbody.

We will apply the fix in next version.

Thank you very much.

PT. Four Best Synergy commented on Mar 24

I dont think my code used table.js file. because i add the code and even empty the table.js file. it not showing any error and still can drilldown the header. this happen in CI.

But in laravel. i can click the header but it just loading and somehow abort the drilldown.

KoolReport commented on Mar 24

Please look for folder "koolreport_assets" in CI, this is the temporary exported resources folder. Remove that folder and run report again.

PT. Four Best Synergy commented on Mar 24

Sorry my bad, i didn't see it. it works now. Thanksss

KoolReport commented on Mar 24


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