i am trying to use Table and DataTables, code below is working with DataTables but not Table, please help me what is wrong here or missed. also please guide for alignment of fields especially right align numer fields.
TestReport.php
<?php
namespace App\Reports;
require APPPATH."Libraries/koolreport/autoload.php";
class TestReport extends \koolreport\KoolReport
{
use \koolreport\codeigniter\Friendship;
function setup()
{
$this->src("default")
->query("SELECT * FROM zones")
->pipe($this->dataStore("zones"));
}
}
TestReport.view.php
<?php
use \koolreport\widgets\koolphp\Table;
?>
<div class='report-content'>
<div class="text-center">
<h1>Zones List</h1>
<p class="lead">The report show Zones</p>
</div>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("zones")->sort(array("id"=>"desc")),
"columns"=>array(
"id"=>array(
"label"=>"Zone ID",
"type"=>"number",
"prefix"=>"$",
),
"zone_name"=>array(
"label"=>"Zone Name"
),
),
"paging"=>array(
"pageSize"=>10,
),
"cssClass"=>array(
"table"=>"table table-bordered table-striped"
)
));
?>
</div>
regards