senailibrary/reportbundle

Geração e padronização de relatórios

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master / 1.3.x-dev 2016-03-29 20:16 UTC

This package is not auto-updated.

Last update: 2024-05-03 17:13:04 UTC


README

The ReportBundle provides a standard template for quick creation of report form listing. It allows you to add basic calculations columns.

Installation

ReportBundle uses Composer, please checkout the composer website for more information.

The simple following command will install ReportBundle into your project. It also add a new entry in your composer.json and update the composer.lock as well.

$ composer require senailibrary/reportbundle:dev-master

Getting Started

<?php

    use SenaiLibrary\ReportBundle\Component\Report;

    public function pdfAction(Request $request) {
        $report = new Report();
        $collection = "your collection"
        $detail = new \SenaiLibrary\ReportBundle\Component\Detail($collection);

        $report->setTitle('Report Title')
                ->setShowPageNumber(true)
                ->setOrientation(Report::Portrait)
                ->addDetail($detail);
        return new \Symfony\Component\HttpFoundation\Response($report->renderPdf(), 200, array(
            'Content-Type' => 'application/pdf',
                )
        );
    }