Skip to content

Uncaught PHPJasper\Exception\ErrorCommandExecutable #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rafaabraham opened this issue Oct 15, 2020 · 2 comments
Open

Uncaught PHPJasper\Exception\ErrorCommandExecutable #263

rafaabraham opened this issue Oct 15, 2020 · 2 comments

Comments

@rafaabraham
Copy link

I have finished drawing the report using jasper studio, and generated a .jasper file, then I tried to compile the file into a pdf report, but I get an error message:

"Uncaught PHPJasper\Exception\ErrorCommandExecutable: 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. in C:\xampp\htdocs\phpjasper-master\src\PHPJasper.php:250 Stack trace: #0 C:\xampp\htdocs\phpjasper-master\export.php(46): PHPJasper\PHPJasper->execute() #1 {main} thrown in C:\xampp\htdocs\phpjasper-master\src\PHPJasper.php on line 250"

please help me...

this is a php file :

`<?php
require DIR . '/vendor/autoload.php';

use PHPJasper\PHPJasper;

$input = '/examples/karyawan.jasper';
$output = '/examples';
$options = [
'format' => ['pdf'],
'locale' => 'en',
'params' => [],
'db_connection' => [
'driver' => 'mysql', //mysql, ....
'username' => 'root',
'password' => 'madajaya',
'host' => 'localhost',
'database' => 'maj_penilaiankar',
'port' => '8080'
]
];

$jasper = new PHPJasper;

$jasper->process(
$input,
$output,
$options
)->execute();
?>`

@edenfoo
Copy link

edenfoo commented Mar 27, 2021

This is because there is an error when generating the report.

Try to change this:
$jasper->process(
$input,
$output,
$options
)->execute();

To this:
$jasper->process(
$input,
$output,
$options
)->output();

Then copy and paste the command in your command prompt:

  1. cd ........\vendor\geekcom\phpjasper\bin\jasperstarter\bin
  2. Paste the command then run

@MiguelEmmanuel46
Copy link

Hi, i get the same error, i run the command of "->output();" in the shell on CentOs 7 and it works, it make the pdf or xls file, but from PHP i get the error mentionet here.
Has anyone already solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants