Hello, I wonder where I went wrong exporting the data.
I get
// ExportAllData.php
<?php
require_once '../../../../../../wp-load.php';
require_once CLASSES . "reports/config/KoolReportConnectionConfig.php";
use \koolreport\processes\OnlyColumn;
use \koolreport\processes\Join;
class ExportAllData extends KoolReportConnectionConfig
{
use \koolreport\export\Exportable;
use \koolreport\excel\ExcelExportable;
public function settings()
{
return $this -> getConfig();
}
public function setup()
{
$events = $this->src('...')->query("SELECT * FROM ...");
$events_add = $this->src('...')->query("SELECT * FROM ...");
$events_ask = $this->src('...')->query("SELECT * FROM ...");
$users = $this->src('...')->query("select * from ...");
$sponsor = $this->src('...')->query("select * from ...");
$join = new Join($events,$users,array("..."=>"..."));
$join2 = new Join($join,$events_add,array("..."=>"..."));
$join3 = new Join($join2,$events_ask,array("..."=>"..."));
$node = new Join($join3,$sponsor,array("..."=>"..."));
$node->pipe($this->dataStore('bornDate'));
}
}
// ExportAllData.view.php
<?php
use \koolreport\excel\Table;
?>
<div sheet-name="sheet1">
<div>
<?php
Table::create(array(
"dataSource" => $this->dataStore('bornDate'),
));
?>
</div>
</div>
<?php
// ExportAllDataExcel.view.php
<?php
use \koolreport\excel\Table;
$sheet1 = "Simple report";
?>
<div sheet-name="<?php echo $sheet1; ?>">
<div cell="A1" range="A1:H1" excelstyle='<?php echo json_encode($styleArray); ?>' >
Enquiry Report
</div>
<div>
<?php
Table::create(array(
"dataSource" => $this->dataStore('bornDate'),
));
?>
</div>
</div>
//exportAll.php
<?php
include "ExportAllData.php";
$report = new ExportAllData;
$report->run();
$report->exportToExcel('ExportAllDataExcel')->toBrowser("ExportAllData.xls");
I can't understand what's the cause of the error.
Regarts