Skip to content

Fatal error #43

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

Closed
pedroaugustoneto opened this issue May 3, 2017 · 3 comments
Closed

Fatal error #43

pedroaugustoneto opened this issue May 3, 2017 · 3 comments

Comments

@pedroaugustoneto
Copy link

Apenas segui os passos do Readme, mas gera o seguinte erro:

Fatal error: Uncaught JasperPHP\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 /Applications/XAMPP/xamppfiles/htdocs/g2city/vendor/geekcom/phpjasper/src/JasperPHP.php:198 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/g2city/index.php(10): JasperPHP\JasperPHP->execute() #1 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/g2city/vendor/geekcom/phpjasper/src/JasperPHP.php on line 198

@geekcom
Copy link
Member

geekcom commented May 4, 2017

Olá @pedroaugustoneto por favor "rode" o método output() para verificar o comando que está sendo gerado na saída, confira também os caminhos dos arquivos, abaixo um exemplo de como executar o método output().

Hello @pedroaugustoneto please run the output () method to check the command, check out the file paths, below an example of how to execute the output () method.

require __DIR__ . '/vendor/autoload.php';

use JasperPHP\JasperPHP;

$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jasper';  
$output = __DIR__ . '/vendor/geekcom/phpjasper/examples';    
$options = [ 
    'format' => ['pdf', 'rtf'] 
];

$jasper = new JasperPHP;

echo 
    $jasper->process(
    $input,
    $output,
    $options
)->output();

@pedroaugustoneto
Copy link
Author

pedroaugustoneto commented May 4, 2017

Fiz com o código que pediu:

./jasperstarter process "/Applications/XAMPP/xamppfiles/htdocs/g2city/vendor/geekcom/phpjasper/examples/hello_world.jasper" -o "/Applications/XAMPP/xamppfiles/htdocs/g2city/vendor/geekcom/phpjasper/examples" -f pdf rtf

Estou utilizando um Mac, também realizei as permissões.

@jadsonbr
Copy link
Contributor

require __DIR__ . '/vendor/autoload.php';

use JasperPHP\JasperPHP;

// Na linha abaixo utilize o .JRXML ao invés do .JASPER
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jrxml';
$output = __DIR__ . '/vendor/geekcom/phpjasper/examples';    
$options = [ 
    'format' => ['pdf', 'rtf'] 
];

$jasper = new JasperPHP;

echo 
    $jasper->process(
    $input,
    $output,
    $options
)->output();

Verifique também a versão do JDK instalado nos S.O.

@geekcom geekcom closed this as completed Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants