KoolReport's Forum

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

Variable to Columns #48

Closed Hallie Gromek opened this topic on on Aug 1, 2017 - 2 comments

Hallie Gromek commented on Aug 1, 2017

Is it possible for KoolReport to have the 'row' controls be variables? Can you show me how to accomplish this. I tried to do it with inputs, however the parameters :row1 didn't work. Can you show me how to accomplish this?

for example: Select parameter :row1 (Customer or client ) `

$node2 ->pipe(new Pivot(array(

 'dimensions'=>array(
    'column'=>'yr,qtr,mon',
	'row'=>':row1, productName'
  ),

So this could change to

$node2 ->pipe(new Pivot(array(

 'dimensions'=>array(
    'column'=>'yr,qtr,mon',
	'row'=>'client, productName'
  ),

OR

$node2 ->pipe(new Pivot(array(

 'dimensions'=>array(
    'column'=>'yr,qtr,mon',
	'row'=>'customer, productName'
  ),

Depending on the select choice.
KoolReport commented on Aug 2, 2017

Hi Hallie,

If you have the params $this->params["row1"], you can just set:

    "row"=>$this->params["row1"].",productName",
Hallie Gromek commented on Aug 2, 2017

Perfect! Solved, thank you!

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