KoolReport's Forum

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

Run 'Set' function in Koolreport #123

Open tee opened this topic on on Oct 3, 2017 - 5 comments

tee commented on Oct 3, 2017

Hi support team,

How i could make below script be run in koolreport? Let say i don't want to use function inside koolreport "#"=>array( "label"=>"No" ) to output auto number.

Script:

SET @rank=0;
SELECT @rank:=@rank+1 AS 'No', location, date from group

Thanks.

KoolReport commented on Oct 4, 2017

Did you try this? Does it work?

tee commented on Oct 4, 2017

It didn't work, blank page was shown.

tee commented on Oct 11, 2017

Hi support team, i am looking forward for your solutions. Thanks.

KoolReport commented on Oct 12, 2017

How is about adding row number like this?

$this->src()->query("...")
->pipe(new CalculatedColumn(array(
    "no"=>"#"
)))

It is not a feature yet, but how do you feel?

KoolReport commented on Oct 12, 2017

The solution now is in CalculatedColumn

->pipe(new CalculatedColumn(array(
    "rowNum"=>"{#}"
)))

If you need the updated CalculatedColumn, please email to us. If is not urgent then you may wait for next version.

Regards,

KoolPHP Inc

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