Recommend this page to a friend! |
Classes of verni | PHP Report | README.md | Download |
|
DownloadPHPReportPHPReport 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. Features
InstallationInstall composer, and run Usage and examplesBasicly, 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(
$R->render(); </pre> It's great for exporting tabular data. Input data can be further formatted, grouped and customized. See the wiki. Building it from templateTemplate 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(
$R->render(); </pre> These reports are great for complex exports like invoices. See the wiki for more examples. |