Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Ahh... I just noticed that I asked the same question in 2019
https://www.koolreport.com/forum/topics/970
It looks like we do not have it till now. Okeee....
Could you tell me please where I am wrong.
I used to do the following:
$join1 = new Join($spoiled_tmp, $cons1, array("item_id" => "itemId"));
$join2 = new Join($join1, $cons2, array("item_id" => "itemId"));
$join2->pipe($this->dataStore('spoiled'));
It worked but I need Left Join in this case so I added
->pipe($this->dataStore('*****'))
to the code where I calculate $spoiled_tmp, $cons1 and $cons2 to get spoiled_tmp
, cons1
and cons2
Datastores;
and then I do
$joined= $this->dataStore('spoiled_tmp')
->leftJoin($this->dataStore('cons1'), array('item_id' => 'itemId'))
->leftJoin($this->dataStore('cons2'), array('item_id' => 'itemId'));
$joined->pipe($this->dataStore('spoiled'));
but I got the empty table where the previous code worked.
Guys is everything ok with koolreport support?
If you offer Priority Support with a 24-hour response time from experienced software engineers and data experts — then we expect that commitment to be honored. Otherwise, it undermines the value of the service we're paying for.
In your MyReport.view.php pls test this left joined datastore:
$joinedDatastore = $this->dataStore('spoiled_tmp')
->leftJoin($this->dataStore('cons1'), array('item_id' => 'itemId'))
->leftJoin($this->dataStore('cons2'), array('item_id' => 'itemId'));
print_r($joinedDatastore->data());
or:
$joinedDatastore = $this->dataStore('spoiled_tmp')
->leftJoin($this->dataStore('cons1'), array('item_id' => 'itemId'))
->leftJoin($this->dataStore('cons2'), array('item_id' => 'itemId'));
$finalDatastore = $joinedDatastore->process(new \koolreport\processes\Custom(function($row){
return $row;
}));
print_r($finalDatastore->data());
Next week, we will also prepare a new left join process for being used in a report setup.
Would you mind printing each datastore's data like this and let us know the result:
print_r($this->dataStore('spoiled_tmp')->data());
print_r($this->dataStore('cons1')->data());
print_r($this->dataStore('cons2')->data());
$joinedDatastore = $this->dataStore('spoiled_tmp')
->leftJoin($this->dataStore('cons1'), array('item_id' => 'itemId'))
->leftJoin($this->dataStore('cons2'), array('item_id' => 'itemId'));
print_r($joinedDatastore->data());
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo