KoolReport's Forum

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

Group process not working #47

Open zenon opened this topic on on Aug 1, 2017 - 2 comments

zenon commented on Aug 1, 2017

Hi KoolPHP Inc,

Followed the example provided below, but resulted in " syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' ". Appreciate your help.

<?php
use \koolreport\processes\Group;
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new Group(
            "by"=>"country,state",
            "sum"=>"polulation"
        ))
        ...
    }
}
zenon commented on Aug 1, 2017

I added 'array' and it works!

<?php
use \koolreport\processes\Group;
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new Group(array(
            "by"=>"country,state",
            "sum"=>"polulation"
        )))
        ...
    }
}
KoolReport commented on Aug 1, 2017

Oh yes, that's our mistake in documentation, thanks for letting us know. We will fix that.

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
help needed
solved

None