-
-
Notifications
You must be signed in to change notification settings - Fork 163
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.
#15
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
Comments
output();
and run it manually in the console.
Make sure you have java installed with the command below.
|
It is |
Substitua o código abaixo
per
And the result runs in the terminal |
Do not forget to grant permission 777 for the directory /vendor/geekcom/phpjasper/src/JasperStarter/bin and the file binary jasperstarter |
It was set at pull request #16 |
In calling the process function just after the connection parameter you entered $jasper->process(
$input,
$output,
array("pdf"),
array(),
$this->conn,
true,
true,
'en-US' //LOCALE
)->execute(); |
Did you run the command from the "C: \ Users \ Erick" folder the jasperstarter binary is there? Shows the code you are making |
well, I set up the jasperstarter on the PATH variable pointing to the \bin directory, so I can run the command from there |
Shows the code you are doing to generate the reports |
|
Are you using which version of Laravel? |
5.3 |
And what version of JDK? |
javac -version To install on windows visit the link-> JDK and look for the most appropriate version for your system. |
|
The path of Java Home is pointed to which directory? |
I added a variable JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_51" |
Uninstall Java and install again Java SE Development Kit 8u111 |
Well first of all thank you very much for the time taken to help with this issue, ass you suggest by performing the re-installation of JDK, now I was able to compile and generate, now
however this is generating an error, because the output command that is generated is:
even the official drivers from the Microsoft link are in the correct folder, this command will not generate the pdf, instead this command does generate the pdf using a sql server database connection:
|
The --db-url parameter must be complete. |
Is that setup automatically by this library? or do I need any additional set up steps? |
I did not understand what you meant. Could you rephrase the question, please? You need to add the corresponding JDBC library to the bank you want to connect to in the And pass the parameters according to the documentation. The more detailed documentation you find at this link below. |
To use SQLServer or any other database other than MySQL, PostgreSQL or Oracle, just have the corresponding library and put it in
Soon your command should look something like the one below. $jasper->process(
$input,
$output,
array("pdf"),
array(),
[
'driver' => 'generic',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
'jdbc_url' => 'jdbc:sqlserver://'.env('DB_HOST', 'localhost').':'.env('DB_PORT', '1433').';databaseName='.env('DB_DATABASE', 'forge'),
'jdbc_dir' => __DIR__ . '/vendor/geekcom/phpjasper/src/JasperStarter/jdbc/'
]
)->execute(); |
Thank you!!
Right now Is working well I guess thats it for now. |
hey @erick-chali, can i close this issue? |
yea sure, thanks for the help... 💯 |
erick, i can compile but i cant to generate any format output. whats wrong with me, btw i m using php>7 and jdk 1.8.xx . please help me bro. |
my error messages: Fatal error: Uncaught PHPJasper\Exception\ErrorCommandExecutable: Your report has an error and couldn 't be processed!\ Try to output the command using the function |
Hi @ashrulkhair, thanks for your comments, please see full example below. Using MSSQL DataBase require __DIR__ . '/vendor/autoload.php';
use PHPJasper\PHPJasper;
$input = '/your_input_path/your_report.jasper or .jrxml';
$output = '/your_output_path';
$jdbc_dir = __DIR__ . '/vendor/geekcom/phpjasper/bin/jaspertarter/jdbc';
$options = [
'format' => ['pdf'],
'locale' => 'en',
'params' => [],
'db_connection' => [
'driver' => 'generic',
'host' => '127.0.0.1',
'port' => '1433',
'database' => 'DataBaseName',
'username' => 'UserName',
'password' => 'password',
'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
'jdbc_url' => 'jdbc:sqlserver://127.0.0.1:1433;databaseName=Teste',
'jdbc_dir' => $jdbc_dir
]
];
$jasper = new PHPJasper;
$jasper->process(
$input,
$output,
$options
)->execute(); |
can you give me simple example in .zip that can i access directly without
make any configuration. honestly i m stuck right now.
thanks.
…On Wed, Sep 25, 2019 at 8:21 PM Daniel Rodrigues ***@***.***> wrote:
Hi @ashrulkhair <https://github.com/ashrulkhair>, thanks for your
comments, please see full example below.
*Using MSSQL DataBase*
require __DIR__ . '/vendor/autoload.php';use PHPJasper\PHPJasper;$input = '/your_input_path/your_report.jasper or .jrxml'; $output = '/your_output_path';$jdbc_dir = __DIR__ . '/vendor/geekcom/phpjasper/bin/jaspertarter/jdbc';$options = [ 'format' => ['pdf'], 'locale' => 'en', 'params' => [], 'db_connection' => [ 'driver' => 'generic', 'host' => '127.0.0.1', 'port' => '1433', 'database' => 'DataBaseName', 'username' => 'UserName', 'password' => 'password', 'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'jdbc_url' => 'jdbc:sqlserver://127.0.0.1:1433;databaseName=Teste', 'jdbc_dir' => $jdbc_dir ]];$jasper = new PHPJasper;$jasper->process( $input, $output, $options )->execute();
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15?email_source=notifications&email_token=AGNNPKHQFPGBNPOEVVVE75TQLNQVZA5CNFSM4CW7ZPA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7R345Q#issuecomment-535019126>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGNNPKCA7DPZCMZZINSPEVTQLNQVZANCNFSM4CW7ZPAQ>
.
--
*Terimakasih,*
*ASHRUL KHAIR*
IT-Dev Sumbagut
|
Error using MSSQL DataBase Hello friends! I'm with this problem when execute the statement. Error filling reportError executing SQL statement for: select [dbo].[users].[name], [dbo].[users].[email] from [dbo].[users] where [dbo].[users].[id] < 10 But the same code jrxml works in jasperstudio. |
We'd fixed with change by api integrations, tks |
I am trying to make the report to work but for some reason I can't get it done,
my code:
But for some reason I'm getting this error:

Can you tell me if there is any missing step.
The text was updated successfully, but these errors were encountered: