I use koolreport on Yii2 and try make a simple report, the report appears but not with css style
Here the code :
- SummaryMaterial.php
<?php
namespace app\controllers;
require(dirname(__FILE__)."../../../vendor/koolphp/koolreport/autoload.php");
//require_once "koolreport/autoload.php";
class SummaryMaterial extends \koolreport\KoolReport
{
use \koolreport\clients\Bootstrap;
function settings()
{
return array(
"assets"=>array(
"path"=>"../../assets",
"url"=>"/assets"
),
"dataSources"=>array(
"data"=>array(
"connectionString"=>"mysql:host=localhost;dbname=sicantas2",
"username"=>"root",
"password"=>"",
"charset"=>"utf8"
)
)
);
}
function setup()
{
$this->src("data")
->query("SELECT * FROM melevator")
->pipe($this->dataStore("elevator"));
}
}
- SummaryMaterial.view.php
<?php
use \koolreport\widgets\koolphp\Table;
?>
<html>
<head>
<title>MyReport</title></title>
</head>
<body>
<h1>MyReport</h1>
<h3>List all Elevator</h3>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("elevator"),
"class"=>array(
"table"=>"table table-hover"
)
));
?>
</body>
</html>