Dynamic Tables
Generates the report as a searchable, sortable, paging table.
Where report output is split using the group option each table group is converted to its own dynamic table. The searchable, sortable and pageable parameters are on by default so do not need to be specified unless you are turning them off.
Usage:
\Reportico\Engine\Builder\build()
->dynamicTable()
->searchable(searchable :set to true if table should be searchable)
->sortable(sortable :set to true if table should have sortable columns)
->pageable(
pageable :set to true if table should be paginated,
page size :The number of rows to show in the paginated table)
<?php
require_once(__DIR__ .'/../vendor/autoload.php');
\Reportico\Engine\Builder::build()
->properties([ "bootstrap_preloaded" => true])
->datasource()->database("mysql:host=localhost; dbname=DATABASE NAME")->user("USER")->password("PASSWORD")
->title ("Employee List")
->description ("Produces a list of our employees")
->sql ("
SELECT EmployeeID employee_id, LastName last_name, FirstName first_name, date(BirthDate) birth_date, Country
FROM northwind_employees
ORDER BY Country, LastName
")
->dynamicTable()
->execute();
?>