Skip to content

Your report has an error and couldn 't be processed! #120

Closed
@PauloCSto

Description

@PauloCSto

Estou começando a estudar o phpjasper, fiz os testes conforme as instruções, estava dando tudo certo, mas quando comecei testar a conexão com meu banco de dados (mysql) tive um problema que ainda não consegui resolver e passou a dar o seguinte erro:

"Fatal error: 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\jasper\vendor\geekcom\phpjasper\src\PHPJasper.php:219 Stack trace: #0 C:\xampp\htdocs\jasper\teste2.php(30): PHPJasper\PHPJasper->execute() #1 {main} thrown in C:\xampp\htdocs\jasper\vendor\geekcom\phpjasper\src\PHPJasper.php on line 219"

meu código :
``

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

use PHPJasper\PHPJasper;

$input = DIR . '/vendor/geekcom/phpjasper/examples/convenio.jasper';
$output = DIR . '/vendor/geekcom/phpjasper/examples';

$options = [
'format' => ['pdf'],
'locale' => 'pt_BR',
'params' => [],
'db_connection' => [
'driver' => 'mysql',
'username' => 'root',
'password' => '',
'host' => 'localhost',
'database' => 'labordb',
'port' => '3306'
]
];

$jasper = new PHPJasper;

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

Mudei a linha para:

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

apareceu a seguinte mensagem:

jasperstarter --locale pt_BR process "C:\xampp\htdocs\jasper/vendor/geekcom/phpjasper/examples/convenio.jasper" -o "C:\xampp\htdocs\jasper/vendor/geekcom/phpjasper/examples" -f pdf -t mysql -u root -p -H localhost -n labordb --db-port 3306

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions