You are not logged in.
Pages: 1
If you have some time to replay to me.
I try to use JasperPHP in Laravel 5 but can't. I make sample report with static text:
![test report](https://cloud.githubusercontent.com/ass … ed2482.png)
But when I publish it and start with Laravel with that code:
$output = public_path() . '/report/Test';
$ext = "pdf";
$jasper = JasperPHP::compile(
public_path() . '/reports/Test.jasper',
true
)->execute();
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.time().'Test.'.$ext);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($output.'.'.$ext));
flush();
readfile($output.'.'.$ext);
unlink($output.'.'.$ext); // deletes the temporary file
And Laravel gives me an error:
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.
Can you help me? What I do wrong? I would like to generate pdf file for that report and send it to client.
Also one more question. How to send param to report?
TNX.
Offline
Hi,
I am afraid you are in the wrong forum. Maybe try contacting cossou directly (https://github.com/cossou/JasperPHP). Taking a wild guess, I'd say, have a look at your jasper report, whether that compiles and works. Of course, I can also recommend looking at ReportServer as an alternative solution to run Jasper reports.
Best regards,
Arno
Offline
Pages: 1