Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

tina4php-reports

The reporting engine for tina4php

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

tina4php-reports

Report engine for the Tina4 PHP framework, generating reports as HTML, CSV, or PDF (via mPDF).

Installation

bash
composer require tina4stack/tina4php-reports

Requirements

  • PHP >= 8.1
  • ext-json
  • mpdf/mpdf ^8.1
  • tina4stack/tina4php-core ^2.0

Usage

Generating an HTML Report

php
use Tina4\Report;

$report = new Report();
// ... configure report data and layout
echo $report->asHTML();

Exporting as CSV

php
$report = new Report();
// ... configure report data
$csv = $report->asCSV("output.csv");

Exporting as PDF

php
$report = new Report();
// ... configure report data
$report->asPDF("report.pdf", "P"); // "P" for portrait, "L" for landscape

Testing

bash
composer test

License

MIT - see LICENSE


Our Sponsors

Sponsored with 🩵 by Code Infinity

Code Infinity

Supporting open source communities • Innovate • Code • Empower