It is possible, you need to create fake data to insert into table:
<?php
class TestReport extends \koolreport\KoolReport
{
function settings()
{
return array(
"dataSources"=>array(
"real_data"=>array(
...
)
"fake_data"=>array(
"class"=>'\koolreport\datasources\ArrayDataSource',
"dataFormat"=>"associate",
"data"=>array(
array("test_taken"=>"Amy","test_date"=>"1/15/2017","test"=>null),
array("test_taken"=>"Amy","test_date"=>"2/15/2017","test"=>null),
array("test_taken"=>"Amy","test_date"=>"3/15/2017","test"=>null),
array("test_taken"=>"Amy","test_date"=>"4/15/2017","test"=>null),
array("test_taken"=>"Amy","test_date"=>"5/15/2017","test"=>null),
array("test_taken"=>"Amy","test_date"=>"6/15/2017","test"=>null),
)
)
)
);
}
function setup()
{
$this->src('real_data')
->pipe(new Cube(
"row'=>"test",
"column=>"test_date",
"count"=>"test_taken"
))
->saveTo($cube);
$this->src('fake_data')
->pipe($cube);
$cube->pipe($this->dataStore('end_data'));
}
}
What we have done above is create a fake data contain all possible test date and test is null. When those data go through Cube they will create the missed date column.
In the setup() function, you see that the real data is piped to Cube, and it is saved to $cube. Then the fake data is piped to $cube as well. The result is like you pour two bottle of water into the same big cup(which is Cube). Then the result will be saved to __end_data__ data store ready to be populated in table.
Please let me know if you need further assistance.
Regards,
Peter