Hi,
Usually for a normal report I'm exporting my report with
require_once REPORT_LOC . '/MyReport.php';
$report = new MyReport();
$report->export($report_template_str)
->settings([
"useLocalTempFolder" => TRUE,
"autoDeleteLocalTempFile" => TRUE,
"phantomjs" => $phantom_dir
])
->pdf(["format" => "A4", 'orientation' => "landscape", "zoom" => 0.5])
->saveAs($file_directory . $file_name);
For a different report, I have a subreport thats also included using the Subreport package. I have a MyReport.php file that imports the MainTable.php and SubTable.php
<?php
require "MainTable.php";
require "SubTable.php";
class MyReport extends \koolreport\KoolReport {
use \koolreport\core\SubReport;
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
use \koolreport\amazing\Theme;
use \koolreport\export\Exportable;
function settings()
{
return [
"dataSources" => [
"kinder" => [
"connectionString" => "mysql:host=" . $_SESSION['db_host'] . ";dbname=" . $_SESSION['db_name'],
"username" => $_SESSION['db_user'],
"password" => $_SESSION['db_pass'],
"charset" => "utf8"
]
],
"subReports" => [
"maintable" => MainTable::class,
"subtable" => SubTable::class,
]
];
}
protected function setup(){
$this->src('kinder')
->query(sessionLocationsQuery())
->pipe($this->dataStore('locationDataStore'));
}
}
Right now the export only exports the MainTable. I would like it to export the Subtable instead. Is this possible?
Thanks