0

I'm getting this error from Laravel 5.2 with JasperReports in cloud9

Exception in JasperPHP.php line 178: Your report has an error and couldn't be processed! Try to output the command using the function `output();` and run it manually in the console.

This is part of my code

 $database = \Config::get('database.connections.mysql');

        $output = public_path() . '/reportes/'.time().'_resumen';

        $ext = "pdf";

        \JasperPHP::process(
            public_path() . '/reportes/resumen.jasper', 
            $output, 
            array($ext),
            array("idVersion"=> $idVersion),
            $database,
            false,
            false
        )->execute();

I already change execute to output and this is what I get

$command= \JasperPHP::process(
            public_path() . '/reportes/resumen.jasper', 
            $output, 
            array($ext),
            array("idVersion"=> $idVersion),
            $database,
            false,
            false
        )->output();
        echo $command;
        die();

This is the call to jasperstarter (with some line breaks for readability):

/home/ubuntu/workspace/vendor/cossou/jasperphp/src/JasperPHP/../JasperStarter/bin/jasperstarter 
process /home/ubuntu/workspace/public/reportes/resumen.jasper 
-o /home/ubuntu/workspace/public/reportes/1467084704resumen 
-f pdf 
-r /home/ubuntu/workspace/vendor/cossou/jasperphp/src/JasperPHP/../../../../../ 
-P idVersion=68 -t mysql -u pms1023 -H localhost -n c9 --db-port 3306
Alex K
  • 22,315
  • 19
  • 108
  • 236
priscila
  • 1
  • 3
  • You probably need to install JDK. See [this closed issue](https://github.com/cossou/JasperPHP/issues/28) – alariva Jun 28 '16 at 03:44
  • I have the JDK already installed and also check that the driver where here vendor/jasperphp/src/JasperStarter/jdbc and nothing – priscila Jun 28 '16 at 03:52
  • Well, I suppose *your report has an error*. Did you design it in the Jaspersoft Studio so that you could check the preview? – tobi6 Jun 28 '16 at 06:53
  • Yes, I checked and I saw the report with all the information y Jaspersoft Studio,but when I tried in the web page doesn't work @tobi6 – priscila Jun 28 '16 at 15:56
  • What happened when you changed it to `output`? Can you call the jasperstarter command without an issue? – tobi6 Jun 29 '16 at 08:15
  • I don't have the error now, we change the template to another one and it seems that it was resolved. The thing is that it show the report but without any information in it. But in Jaspersoft Studio it show everything @tobi6 – priscila Jun 29 '16 at 19:22

0 Answers0