KoolReport's Forum

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

Great framework for reporting, I have a question #1686

Open Marty opened this topic on on Oct 28, 2020 - 2 comments

Marty commented on Oct 28, 2020

KoolReport is absolutely great framework for reporting that I have been using so far. I have a small question: There are many times I encounter situation when I need to pipe to a process with a condition. I mean the process will be activated based on user input. How could I do that?

Sebastian Morales commented on Oct 28, 2020

Marty, you could try some method like this:

$this->src(...)
->pipe(...)
->saveTo($node1);

if ($inputCondition) {
    $node1->pipe(...)
    ->pipe($this->dataStore(...));
} else {
    $node1->pipe(...)
    ->pipe($this->dataStore(...));
}

Inform us if you want something else.

KoolReport commented on Oct 28, 2020

Alternative solution would be pipeIf.

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
None yet

None