PHP code example of spacebarz51 / pivot-report

1. Go to this page and download the library: Download spacebarz51/pivot-report library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spacebarz51 / pivot-report example snippets


$pivotReport = new PivotReport(
    'Budget Report', 'budget_code', 'payment_code', 'total', $pivotData);
echo $pivotReport->getDefaultCSS();
echo $pivotReport->generateHtml(['class' => 'reportTable']);

$pivotReport = new PivotReport('Budget Report', 'budget_code', 'payment_code', 'total', $pivotData);
$pivotReport->generateCsv();

$pivotReport = new PivotReport('Budget Report', 'budget_code', 'payment_code', 'total', $pivotData);
$pivotReport->generatePdf();

$pivotReport = new PivotReport('Budget Report', 'budget_code', 'payment_code', 'total', $pivotData);
$pivotReport->generatePdf('test.pdf');