PHP Classes

File: quickstart.txt

Recommend this page to a friend!
  Classes of Leonid  >  PHP Report Designer  >  quickstart.txt  >  Download  
File: quickstart.txt
Role: Documentation
Content type: text/plain
Description: quick guide
Class: PHP Report Designer
Display interactive report data from arrays
Author: By
Last change:
Date: 5 years ago
Size: 1,585 bytes



Class file image Download
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
$row['A'] = 'Field value';
$row['B'] = '1';
$row['C'] = '2';
ans so on
We setting this array to a source
!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;
\Then selkect data again , cache_ttl is regulating minutes to live
We assign key table rows
We assign key table cols
We assign data cells
Labels for data cells
$rd->labels['qty'] = 'pcs';
$rd->labels['sum'] = 'usd';
title and Description
$rd->title = 'PHP reportDesigner Demo';
$rd->description = 'Demo report';
Call operation controller (you must provide css file and path to mpdf lib to download pdf reports)
Transforming data
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
echo $rd->DrawTb();