KoolReport's Forum

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

Wierd behaviour of Collapse/Expand in PivotMatrix #1063

Closed Alessandro opened this topic on on Aug 28, 2019 - 5 comments

Alessandro commented on Aug 28, 2019

Hi Koolreport Team, I'm using PivotMatrix and sometimes, when I expand a single row, the whole table reloads, autoexpanding everything and losing all filters applied.

How can I fix this? Also, is there any way to speed up the loading of the table?

This is the filtered table:

And this is after the "expand bug"

Thanks for the attention.

Sincerely,

Alessandro

KoolReport commented on Aug 28, 2019

Thank you for contacting us, since I have not yet been able to reproduce the issue so I have contacted the dev.team to investigate issue deeper.

David Winterburn commented on Aug 28, 2019

Hi Alessandro,

Please post your php code and send us a link to your page if it's possible (email: support@koolphp.net). Thanks!

Alessandro commented on Aug 28, 2019

Hi David, I sent you the files and the link by email.

Thanks for the quick response,

Alessandro

David Winterburn commented on Aug 30, 2019

Hi Alessandro,

We have just answered your questions via email but there's failed email delivery. Would you please email us how to reach to you.

1/ Anyway, to fix your reloading problem when expanding some rows please open the file pivot/widgets/assets/PivotMatrix.js and replace all (there should be 3 occurences in functions expandCollapseRow, expandCollapseRowBun and expandCollapseColumn)

if (tree.children[j].name === nodes[i]) {

with this:

//use == instead of === because sometimes 
//nodename like '1' is converted to 1, which causes inequality
if (tree.children[j].name == nodes[i]) {

2/ Regarding your second question, to make initial loading of PivotMatrix faster you could set “partialProcessing” = true when setting up pivot process:

->pipe(new Pivot(array(

"column"=>...,
"row"=>"...
"aggregates"=>array(
    ...
),
"partialProcessing" => true

)))

This option will make PivotMatrix only process and show first level headers for both row and column. Each time you expand a header the matrix will process a little more.

Then you could compare differences between this and the default loading. Let us know if you have any question. Thanks!

Alessandro commented on Aug 30, 2019

Hi David, It works perfectly as I had hoped. Thank you so much for your support !

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
solved

None