KoolReport's Forum

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

Illegal offset in pivot table #1112

Open Daniel Amamoo-Otchere opened this topic on on Oct 7, 2019 - 7 comments

Daniel Amamoo-Otchere commented on Oct 7, 2019

Hi, I keep getting illegal offset in the Pivot table with error showing in the snapshot below. I am using the latest packages.

Kindly assist me with a fix.

David Winterburn commented on Oct 7, 2019

Hi Daniel,

Would you please let me know your version of KoolReport Core and Pivot? Thanks!

Daniel Amamoo-Otchere commented on Oct 7, 2019

Hello David, Using the current build koolreport_pro_4.3.0

David Winterburn commented on Oct 7, 2019

Hi Daniel,

It is indeed a bug of Pivot 6.2.0. Would you please open the file pivot/PivotUtil.php and replace the following lines:

            $rowFields = $meta['pivotRows'];
            $colFields = $meta['pivotColumns'];

with these ones:

            $rowFields = Util::get($meta, 'pivotRows', ['root']);
            $colFields = Util::get($meta, 'pivotColumns', ['root']);

Notice that there're 2 places that need this replacement. Let me know if it fixes the problem. Thanks!

Daniel Amamoo-Otchere commented on Oct 7, 2019

Hello David, I did the replacement but still same error shows even after change of browser.

David Winterburn commented on Oct 8, 2019

Hi Daniel,

Would you mind send us your php code as well some sample of your data (via email if the data is confidential)? Thanks!

David Winterburn commented on Oct 8, 2019

By the way, Daniel, I'm not sure your file Utility.php is the most up to date version because the latest Utility.php has no code in lines 301, 302, 304. Please either update your composer.json require or download the latest Core package on our site. Thanks!

KoolReport commented on Oct 8, 2019

Hi Daniel,

Could you please upgrade to KoolReport Pro 4.3.1. We are deeply sorry for the inconvenience.

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
None yet

Pivot