KoolReport's Forum

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

Core/DataStore method toTableArray() #1181

Open Gunnar Rikardsson opened this topic on on Nov 26, 2019 - 1 comments

Gunnar Rikardsson commented on Nov 26, 2019

Ver 4.3.0 Typo ? $rows -- $row

foreach ($this->data as $rows) {
    array_push($result, array_values($row));
}

rgds Gunnar R

KoolReport commented on Nov 26, 2019

Thank you very much for letting us know, please change the method to this:

    public function toTableArray()
    {
        if ($this->count()>0) {
            $result = array(
                array_keys($this->rows[0])
            );
            
            foreach ($this->rows as $row) {
                array_push($result, array_values($row));
            }
            return $result;
        }
        return [
            array_keys($this->meta["columns"])
        ];
    }

The fix will be applied.

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

None