Dear support team,
like the example "export/sakila_rental/ I have implemented the PDF export fucntionaly in my following application structure:
export.php:
require_once "rck.php";
$report = new rck;
$report->run()
->export('rckPdf')
->pdf(array(
"format"=>"A4",
"orientation"=>"landscape",
))
->toBrowser("rck.pdf");
index.php:
error_reporting(0);
require_once "rck.php";
$rck = new rck;
$rck->run();
?>
<!DOCTYPE >
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>ADR: Rückstände</title>
<link rel="shortcut icon" href="nikon_favicon.ico">
<link rel="stylesheet" href="../autorep.css" />
</head>
<body>
<div id="main">
<?php $rck->render();?>
</div>
</body>
</html>
in rck.php "Exportable" is bound:
require_once "../koolreport/autoload.php";
use \koolreport\processes\Filter;
use \koolreport\processes\ColumnMeta;
use \koolreport\pivot\processes\Pivot;
use \koolreport\processes\Group;
use \koolreport\processes\Sort;
use \koolreport\processes\Limit;
use \koolreport\cleandata\FillNull;
use \koolreport\processes\Custom;
class rck extends koolreport\KoolReport
{
use \koolreport\clients\FontAwesome; //für die Collapse + icons
use \koolreport\clients\Bootstrap;
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
use \koolreport\export\Exportable;
And finally rckPdf.view.php:
use \koolreport\pivot\widgets\PivotTable;
use \koolreport\widgets\koolphp\Table;
use \koolreport\inputs\MultiSelect;
use \koolreport\inputs\Select2;
use \koolreport\inputs\CheckBoxList;
use \koolreport\inputs\RadioList;
use \koolreport\widgets\google\BarChart;
use \koolreport\widgets\google\PieChart;
use \koolreport\widgets\google;
?>
<html>
<body style="margin:0.5in 1in 0.5in 1in">
<link rel="stylesheet" href="../koolreport/clients/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="../koolreport/clients/bootstrap/css/bootstrap.theme.min.css" />
<link rel="stylesheet" href="../autorep.css" />
<div class="page-header" style="text-align:right"><i>AutoRep</i></div>
<div class="page-footer" style="text-align:right">Seite {pageNum}</div>
<div class="text-center">
<h1>ADR: Rückstände</h1>
<h4>AussenDienstReporting</h4>
</div>
<hr/>
<!-- <div id="col1"> -->
<div id="col1_content" class="clearfix">
<h3> <img src="icon_grid.png"/> RÜCKSTÄNDE: KundenNr. / Kundenname / Kunden P.O. / Produktname / Bestelldatum / Schedule-Datum</h3>
<?php
if((isset($_POST["btnSubmit"])) AND ($this->dataStore("Reporting.RCK1")->countData()>0))
{
PivotTable::create(array(
"dataStore"=>$this->dataStore('Reporting.RCK1'),
"measures" => array(
"Openqty - sum",
"Openval - sum",
),
"headerMap" => array(
"Openqty - sum" => "∑ RCK-Menge",
"Openval - sum" => "∑ RCK-Umsatz pro Monat",
),
"rowCollapseLevels" => array(0), //0 = zu, 1 = 1. Level auf, 2 = 1. + 2. Level auf etc.
"columnCollapseLevels" => array(2),
"totalName" => '<div align="right"><strong>GESAMT</strong></div>'
));
}
?>
</div>
<div id="col1_content" class="clearfix">
<h3> <img src="icon_grid.png"/> RÜCKSTÄNDE: Artikel</h3>
<?php
if((isset($_POST["btnSubmit"])) AND ($this->dataStore("Reporting.RCK2")->countData()>0))
{
PivotTable::create(array(
"dataStore"=>$this->dataStore('Reporting.RCK2'),
"measures" => array(
"Openqty - sum",
"Openval - sum",
),
"headerMap" => array(
"Openqty - sum" => "∑ RCK-Menge",
"Openval - sum" => "∑ RCK-Umsatz pro Monat",
),
"rowCollapseLevels" => array(0),
"columnCollapseLevels" => array(2),
"totalName" => '<div align="right"><strong>GESAMT</strong></div>'
));
}
?>
</div>
</div>
</body>
</html>
My frontend view is like:
In the outcoming rck.pdf file I removed the left column so that only the 2 pivot tables should be shown there. BUT I see only the titles without the pivot tables as below! What is wrong in my code?
Kind regards