KoolReport's Forum

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

PivotMatrix Excel Export #3095

Open herman.kramar opened this topic on on Jul 13, 2023 - 1 comments

herman.kramar commented on Jul 13, 2023

Hello guys! I'm writing export feature for my pivot table and have some issue. When exporting without column filled i'm having error fired by \koolreport\excel\PivotTableBuilder class in method dataStoreToSpreadsheet in line:

$value = $mappedColFields[$f];

When i haven't columns (only total column which represented as root) $mappedColFields is empty and thrown error "undefined array key "root"". I'm fixed this by providing null check like:

$value = $mappedColFields[$f] ?? null;

I'm didn't think thats a good idea to change vendor files or rewrite by extending. So may you include this fix in next builds or there some another fixes presents ?

David Winterburn commented on Jul 14, 2023

Herman, thank you for your contribution. We will test this case and include your suggestion to the next version of Pivot and Excel packages. Rgds,

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
bug
help needed
suggestion

Excel