KoolReport's Forum

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

PivotSQL and rowCollapseLevels not working #3349

Open Marloes opened this topic on on Oct 11 - 5 comments

Marloes commented on Oct 11

Hi,

When using PivotSQL (Dashboard and also the standalone) I've noticed that the 'rowCollapseLevels' (and also 'columnCollapseLevels') are not working. When on first load all rows are in collapse state, no matter if 'rowCollapseLevels' is set or not.

See image below:

With kind regards, Marloes

Sebastian Morales commented on Oct 14

Ah yes, the default collapsed levels of PivotSQL are by designed for faster loading reason. We will see if there's a way to make at least one level expanded by default without sacrificing too much speed.

Marloes commented on Oct 14

Hi Sebastian,

Thank you for the quick response! Would be nice to have this feature. Thx!

With kind regards, Marloes

Sebastian Morales commented on Oct 22

Right now we have a client-side command to expand all nodes of a level, such as "productLine". You can even run it upon PivotMatrix loading to expand a level:

    PivotMatrix::create(array(
        "id" => "PivotMatrix1",
        ...
        'onReady' => "function() {
            PivotMatrix1.batchExpandCollapse('row', 0, 'expand'); // expand all nodes of row field level 0 upon loading
        }"
    )); 

Do you think it's good enough for your case?

Marloes commented on Oct 22

Thx Sebastian,

And how can I implement it in the Dashboard PivotSQL?

With kind regards, Marloes

Sebastian Morales commented on Oct 23

Just found out that Dashboard's PivotMatrix KWidget has not included "onReady" property like the KoolReport Pro's one does yet. Pls email us at support@koolreport.com and mention this topic, we will send you the latest version version of Dashboard's PivotMatrix which supports "onReady" so that it could automatically expand all a level at loading.

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
suggestion

Pivot