PHP code example of gaiththewolf / jasper-report-client

1. Go to this page and download the library: Download gaiththewolf/jasper-report-client 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/ */

    

gaiththewolf / jasper-report-client example snippets


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;
    }
}

use JSRClient;

class TestController extends Controller {

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

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