KoolReport's Forum

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

Group process #85

Open zenon opened this topic on on Aug 22, 2017 - 4 comments

zenon commented on Aug 22, 2017

Hi,

For my first report, I did as below for it to work.

->pipe(new Group(array(
            "by"=>"dept",
            "sum"=>"qty, price"
        )))

Then, I did the same thing for my second report, but it did not work. Instead, I tried as below and it worked!

->pipe(new Group(array(
            "by"=>"dept",
            "sum"=>"qty", "price"
        )))

However, I tried both ways for my third report, and both does not work!

Could you please show me how to solve this?

Appreciate your help.

Thanks a lot.

KoolReport commented on Aug 22, 2017

Leave out the space, please try

"sum"=>"qty,price"
zenon commented on Aug 22, 2017

Yes, it works!

But I am wondering how come it worked for the first two reports. Anyway, I have changed all to without the space.

Thank you very much.

zenon commented on Aug 22, 2017

How to use CalculatedColumn to calculate, for example, qty/price (using the result from Group process)?

KoolReport commented on Aug 22, 2017

You do

->pipe(new CalculatedColumn(array(
    "quantity_over_price"=>"{qty}/{price}"
)))

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

None