Skip to content

Laravel package integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

License

Notifications You must be signed in to change notification settings

mr-wolf-gb/jasper-report-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Very short description of the package

Latest Version on Packagist Total Downloads

This is a Laravel package integrating the Jasper Server REST v2 client (Jaspersoft/rest-client).

Inspired from JasperReportBundle

Requirements

To use this package, you will need:

  • JasperReports Server (version >= 5.2)
  • PHP (version >= 5.3, with cURL extension)

Installation

You can install the package via composer:

composer require gaiththewolf/jasper-report-client

The package will automatically register itself.

You can publish the config with:

php artisan vendor:publish --provider="Gaiththewolf\JasperReportClient\JasperReportClientServiceProvider" --tag="config"

.env file

JRS_BASE_URL="http:https://127.0.0.1:8080/jasperserver"
JRS_USERNAME="jasperadmin"
JRS_PASSWORD="jasperadmin"
JRS_ORG_ID=null

Usage

Generating report

use JSRClient;

class TestController extends Controller {

    public function generate_report() {
        $format = "html";
        $reportUnit = "/reports/my_report_liste";
        $params = array(
            "inputControl1" => "value 1",
            "inputControl2" => "value 2",
            "inputControl3" => "value 3",
        );
        $res = JSRClient::generate($reportUnit, $params, $format);
        return $res;
    }
}

Supported Format

- html
- xml
- pdf
- xlsx
- xls
- rtf
- csv
- odt
- docx
- ods
- pptx

Get report input Controls

use JSRClient;

class TestController extends Controller {

    public function get_inputControls_report() {
        $reportUnit = "/reports/my_report_liste";
        $res = JSRClient::getReportInputControls($reportUnit);
        dd($res);
    }
}

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

About

Laravel package integrating the Jasper Server REST v2 client (Jaspersoft/rest-client)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages