Skip to content

phpjasper da erro com o postgres e parametro #181

Closed
@Danillosdd

Description

@Danillosdd

Ao usar a bibliotca phpjasper no hello world foi com sucesso, mais ao tentar com conexão no banco e parametro dá este erro abaixo, estou utilizando o xampp e o postgres:

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\relatorio\vendor\geekcom\phpjasper\src\PHPJasper.php:221 Stack trace: #0 C:\xampp\htdocs\relatorio\venda.php(29): PHPJasper\PHPJasper->execute() #1 {main} thrown in C:\xampp\htdocs\relatorio\vendor\geekcom\phpjasper\src\PHPJasper.php on line 221

Meu Arquivo .php que chama a bilioteca está assim:

<?php

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

use PHPJasper\PHPJasper;    

$input = '/vendor/geekcom/phpjasper/examples/venda.jasper';   
$output = '/vendor/geekcom/phpjasper/examples';
$options = [
    'format' => ['pdf'],
    'locale' => 'pt_BR',
    'params' => [5],
    'db_connection' => [
        'driver' => 'postgres',
        'username' => 'postgres',
        'password' => 'honeypot',
        'host' => 'localhost',
        'database' => 'nathusa',
        'port' => '5432'
    ]
];

$jasper = new PHPJasper;

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

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