|Classes of verni||>||PHP Report||>||README.md||>||Download|
PHPReport is a class for building and exporting reports from PHP. It's based on powerful PHPExcel library and includes exporting to popular formats such are HTML, Excel or PDF.
Install composer, and run
Usage and examples
Basicly, there are two way to build a report.
Building it "from scratch"
PHPReport does all the work, your just provide it with your data, like this: <pre> $R=new PHPReport(); $R->load(array(
It's great for exporting tabular data. Input data can be further formatted, grouped and customized. See the wiki.
Building it from template
Template is usually some excel file, already formatted and with placeholders for data. There are two types of placeholders: static and dynamic. Static placeholders are, for example, some data like date, city or customer name. Dynamic placeholders are, for example, list of products with variable number of rows.
<pre> $R=new PHPReport(array('template'=>'invoice_template.xls')); $R->load(array(
These reports are great for complex exports like invoices. See the wiki for more examples.