Tabulator Column Calculations Minimal theme
Tabulator Column Calculations
HIDE CODE
<?php
$xcrud = Xcrud::get_instance();
$xcrud->table('payments');
$xcrud->label('checkNumber','Check No');
$xcrud->label('paymentDate','Payment Date');
$xcrud->label('customerNumber','Customer Number');
$xcrud->label('amount','Amount');
$xcrud->columns('paymentDate,customerNumber,checkNumber,amount');
$xcrud->column_width('checkNumber','35%');
$xcrud->column_width('paymentDate','25%');
$xcrud->column_width('action','30%');
$xcrud->tabulator_column_properties('customerNumber','topCalc:avg');
$xcrud->tabulator_column_properties('amount','bottomCalc:sum');
$xcrud->tabulator_column_properties('paymentDate','topCalcFormatter:star');
//$xcrud->tabulator_column_properties('amount','topCalcParams:{precision:1}');
$xcrud->tabulator_active(true);
$xcrud->tabulator_main_properties('responsiveLayout:"collapse",
movableColumns: true,
headerVisible:true,
width: "100%",
columnCalcs:"both",
height: "400px",
groupStartOpen:true,
placeholder:"No Data Available",
tooltipsHeader:true,
tooltips:true'); //'layout: "fitColumns",
//function paramLookup(values, data){
//values - array of column values
//data - all table data
//do some processing and return the param object
// return {param1:"green"};
//}
echo $xcrud->render();
?>
Fatal error: Uncaught mysqli_sql_exception: Table 'shpilkina.payments' doesn't exist in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php:61 Stack trace: #0 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php(61): mysqli->query('SHOW COLUMNS FR...', 1) #1 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(4896): Xcrud_db->query('SHOW COLUMNS FR...') #2 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud.php(1992): Xcrud->_get_table_info() #3 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\pages\tabulator_column_calculations.php(42): Xcrud->render() #4 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\html\template.php(82): include('D:\\aaa_iVzuvi\\t...') #5 D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\demos\index.php(31): include('D:\\aaa_iVzuvi\\t...') #6 {main} thrown in D:\aaa_iVzuvi\test\Shafa\Telegram_Item_Parser\htdocs\shpilkina\xcrud_1.7.0.7\xcrud\xcrud_db.php on line 61