2017 © Pedro Peláez
 

symfony-bundle symfony-jasper-report-bundle

Symfony 3 Bundle integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

image

yohkenn/symfony-jasper-report-bundle

Symfony 3 Bundle integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

  • Thursday, March 1, 2018
  • by nckenn
  • Repository
  • 2 Watchers
  • 4 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

JasperReportBundle

The JasperReportBundle requires jaspersoft/rest-client and provides an JasperReport-Client as service in the Symfony service container., (*1)

Installation

1 Add bundle to composer.json:, (*2)

    composer require yoh/symfony-jasper-report-bundle

2 Register bundle in app/AppKernel.php:, (*3)

    $bundle = [
            ...
            new Yoh\JasperReportBundle\YohJasperReportBundle(),
            ...
    ];

3 Add parameter to app/config/config.yml, (*4)

    yoh_jasper_report:
        jrs_host:      "%jrs_host%"
        jrs_port:      "%jrs_port%"
        jrs_base:      "%jrs_base%"
        jrs_username:  "%jrs_username%"
        jrs_password:  "%jrs_password%"
        jrs_org_id:    "%jrs_org_id%"

4 Add a dummy configuration in app/config/parameters.yml.dist, (*5)

    jrs_host:      127.0.0.1
    jrs_port:      8080
    jrs_base:      jasperserver
    jrs_username:  jasperadmin
    jrs_password:  jasperadmin
    jrs_org_id:    null

5 Add your own configuration in app/config/parameters.yml, (*6)

Usage

You can now access the Client object via the Symfony service yoh.jasper.report:, (*7)

    $client = $this->get('yoh.jasper.report')->getJasperClient();

Using Report Service :, (*8)

    $reportService = $client()->reportService();

So a controller giving back a pdf-report would look like, (*9)

    public function reportAction(Request $request)
    {
        $format = "pdf";
        $reportUnit = "/reports/sampleReport";
        $params = array(
            "Custom Label 1" => "Custom Value 1",
            "Custom Label 2" => "Custom Value 2"
        );

        return $this->get('yoh.jasper.report')->generate($reportUnit, $format, $params);
    }

The Versions

01/03 2018

dev-master

9999999-dev

Symfony 3 Bundle integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

  Sources   Download

MIT

The Requires

 

by Yoh Kenn

rest bundle symfony3 symfony 3 jasperreport

19/05 2017

v1.2

1.2.0.0

Symfony 3 Bundle integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

  Sources   Download

MIT

The Requires

 

by Yoh Kenn

rest bundle symfony 3 jasperreport

30/07 2016

v1.1

1.1.0.0

Symfony 3 Bundle integrating the Jasper Server(community edition) REST v2 client (Jaspersoft/jrs-rest-php-client)

  Sources   Download

MIT

The Requires

 

by Yoh Kenn

symfony3 jasperreport

30/07 2016

v1.0

1.0.0.0

Symfony 3 Bundle integrating the Jasper Server(community edition) REST v2 client (Jaspersoft/jrs-rest-php-client)

  Sources   Download

MIT

The Requires

 

by Yoh Kenn

symfony3 jasperreport