Skip to content
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

Does this work on Windows #318

Open
malcolmfowler opened this issue May 7, 2022 · 2 comments
Open

Does this work on Windows #318

malcolmfowler opened this issue May 7, 2022 · 2 comments

Comments

@malcolmfowler
Copy link

I followed the instructions and the example report has the following error;

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

USING OUTPUT()
jasperstarter process "C:\xampp\htdocs\reporting/reports/hello_world.jrxml" -o "C:\xampp\htdocs\reporting/customer_reports" -f pdf rtf

@adeelahmed233
Copy link

adeelahmed233 commented Aug 15, 2022

I am also getting this error with MySql in Windows 10 64 bit.

Here is the code I am using
`<?php
// Required to take the phprunner context
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//include("../include/dbcommon.php");

require_once DIR . '/../endroid/vendor/autoload.php';

use PHPJasper\PHPJasper;

$inputraw = DIR . '/../endroid/vendor/geekcom/phpjasper/examples/FA_2x1.jrxml';

$jasper = new PHPJasper;
$jasper->compile($inputraw)->execute();

$input = DIR . '/../endroid/vendor/geekcom/phpjasper/examples/FA_2x1.jasper';
$output = DIR . '/../endroid/vendor/geekcom/phpjasper/examples';
$options = [
'format' => ['pdf'],
'locale' => 'en',
'params' => [],
'db_connection' => [
'driver' => 'mysql', //mysql, ....
'username' => 'root',
'password' => '',
'host' => '127.0.0.1',
'database' => 'abcd',
'port' => '3306']
];

$jasper = new PHPJasper;

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

Please help

@rizts
Copy link

rizts commented Aug 29, 2022

anyone have fixed this issue?
I tried to process it on ubuntu and worked properly
but when I did it on windows (xampp), the report just show null value
whilst the project must be run on windows

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