Let's see as in example how quickly you can develop easy report
0.Include class
include 'repdesigner.php';
1.We create instance
$rd = new RepDesigner();
We select some data, data is array of associative array values
example
$row['A'] = 'Field value';
$row['B'] = '1';
$row['C'] = '2';
$data[]=$row;
....
$data[]=$row;
ans so on
We setting this array to a source
$rd->SetSourceData($data);
!Important noe! You can use Cache! Or select each time data again, cache saved as post data on the web page of user
turn on cache
$rd->cache_on = true;
if(!$rd->ValidateCache())
{
\Then selkect data again , cache_ttl is regulating minutes to live
$rd->SetSourceData($data);
}
$rd->SetHorizontal(["month","city"]);
$rd->SetVertical(["salesman","product"]);
$rd->SetData(["qty","sum"]);
$rd->labels['qty'] = 'pcs';
$rd->labels['sum'] = 'usd';
$rd->title = 'PHP reportDesigner Demo';
$rd->description = 'Demo report';
$rd->PerformIfAction('./reporter.css','','','./pdf/mpdf.php');
$rd->TransformData();
Now write html , do not forget prerequisites (JQUERY,JS for repdesigner,CSS file)
<link rel="stylesheet" href="./css/reporter.css"/>
<script type="text/javascript" src="./js/jq.js"></script>
<script type="text/javascript" src="./js/repdesigner.js"></script>
12. Just out the table
<?php
echo $rd->DrawTb();
?>
DONE!