Hi Guys,
I am trying to run this template:
<?php
use \koolreport\widgets\koolphp\Table;
use \koolreport\widgets\google\PieChart;
use \koolreport\widgets\google\BarChart;
use \koolreport\widgets\google\ColumnChart;
use \koolreport\export\Exportable;
?>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hours of Care</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1 class ="title"> Hours of Care </h1></br></br>
<img src = "./menulogob@3x.png" class = "logo img-responsive" width = "300px" height = "300px">
<div class = "container-fluid">
<style>
body {
font-family: 'Raleway', sans-serif;
}
.title {
text-align: center;
font-weight: bold;
}
.table row-group:first-child .table tr:last-child {
position: absolute;
right: 0;
}
/* .tablecustom td:nth-child(1) {
background-color:#3A6BB4;
font-weight: bold;
color: white;
} */
/* .tablecustom th {
background-color:#3A6BB4;
font-weight: bold;
color: white;
} */
.grid {
display: contents;
width: 100%;
}
.totalcell {
background: #275DAD;
color: white;
}
.logo {
position: absolute;
left:0;
top:0;
max-width: 70%;
height: auto;
padding: 20px 20px;
}
</style>
<?php
Table::create([
"dataStore" => $this -> dataStore('resultset1'),
"columns" => ["code" => ["label" => "Code"], "fullname" => ["label" => "Name"], "AssignmentDate" => ["label" => "Assignment date"],
"SUMScheduledMinute" => ["label" => "Scheduled Time"], "SUMActualMinute" => ["label" => "Actual Time"]],
"cssClass" => ["table"=>"tablecustom table table-bordered table-striped table-hover table-condensed"],
"grouping" => [
"JobroleCode" =>["calculate" => [
"{sumSchedMin}" => ["sum", "SUMScheduledMinute"],
"{sumActualMin}" => ["sum", "SUMActualMinute"]],
"top" => "<b>Jobrole: </b>{JobroleCode}",
"bottom" => "<td></td><td></td> <td class = 'totalcell'><b> Total </b></td><td><b> {sumSchedMin} </b></td></br> </br><td><b> {sumActualMin} </b></td>"]]
]);
?>
via export but always get blank PDF - I am calling it like so:
$reporthtml = $maxkool -> run() -> render(null, true);
$maxkool -> run() -> export($reporthtml) -> pdf([
"format"=>"A4",
"orientation"=>"portrait"]) -> toBrowser("maxtimereport.pdf");
So returning the above template and passing it into export function - always gives me blank PDF.
I have included
use \koolreport\export\Exportable;
Inside my report class and ensured that the phantomjs file in the bin directory is compatible with my server (CentOS so using Linux version) and has permissions to read write and execute.
Please any indications as to why this isn't working?