dm_ireport2php: advanced features for Jasper iReport

English

Hello to all.
For those interested in generating pdf reports with iReport, I’m putting up the functions that interact with PHPJasperXML (updated in some parts, and added new features) by sending data through arrays both iReport that the query that will be executed within iReport.
Create visual reports with iReport, decoding, generates pdf and send email with dm_ireport2php
Ability to create standard reports and versions of the same report for different companies, groups and users
Resource files for language translation using the same report
Without going in the feature, I put all the necessary download, doc and for testing scripts http://www.dmatik.com/dm_ireport2php.html
Other features are in the works to this vers. 1:00
All usable for any use and purpose.
Hello
Enrico

Romanian

Bună ziua tuturor.
Pentru cei interesați ?n generarea de rapoarte pdf cu iReport, eu pun functiile care interactioneaza cu PHPJasperXML (actualizat ?n unele părți, și am adăugat noi caracteristici) prin trimiterea de date prin matrici at?t iReport că interogarea care va fi executat ?n iReport.
Crearea de rapoarte vizuale cu iReport, decodare, generează pdf și trimite e-mail cu dm_ireport2php
Abilitatea de a crea rapoarte standard și versiuni ale aceluiași raport pentru diferite companii, grupuri și utilizatori
Fișierele de resurse pentru traducerea limbajului utiliz?nd același raport
Fără a merge ?n caracteristica, am pus toate descărcare necesare, doc și pentru script-uri de testare http://www.dmatik.com/dm_ireport2php.html
Alte caracteristici sunt ?n lucrările acestui Vers. 1:00
Toate utilizabile pentru orice utilizare și scop.
Salut
Enrico

Italiano

Ciao a tutti.
Per chi fosse interessato a generare report pdf con iReport, sto mettendo a punto delle funzioni che interagiscono con PHPJasperXML (aggiornato in alcune parti e aggiunte nuove funzionalit?) inviando dati tramite array sia a iReport che alla query che sar? eseguita all’interno di iReport.
Crea visual report con iReport, decodifica, genera in pdf e invia email con dm_ireport2php
Possibilit? di creare report standard e versioni dello stesso report per aziende, gruppi e utenti diversi
Resource file per traduzione in lingua utilizzando uno stesso report [SIZE=13px]Senza dilungarmi nell’elenco delle funzionalit?, ho messo tutti i download necessari, doc e gli script per i test in http://www.dmatik.com/dm_ireport2php.html[/SIZE]
Sono in lavorazione altre funzionalit? a questa vers. 1.00
Tutto utilizzabile per qualsiasi uso e scopo.
Ciao
Enrico

Very interesting. What changes you did to PHPJasperXML? Last news I have is that PHPJasperXML an abandoned lib, with a lot of features not implemented (subreports, decimal points writed directly on PHP script and so on…). It’s compatible with latest versions? I will take a look later.

Congrats.

Yes. PhpJasperXML is a lib abandoned.
I have updated some mistakes and added some other fields.

The most important improvements and fixes faults, made the class PHPJasperXML 0.9d, are:

  • Display of static fields in groups (header and footer)
  • Smoothed the path relative to the images directory. Before it was not converted the path of picture with iReport and remained in original condition and was lost portability in web server (Windows and Linux).
    Eg.: The image inserted in iReport ‘c: \ php \ www \ images \ logo.jpg’ is converted to ‘default / logo.jpg’.
  • Use of the field $ {field} R to be used with resource files for both single report that ‘generic’ for all project reports.

To realize the error correction might try to take the original version of PHPJasperXML 0.9d and cronies with mine!
There is still much to do … more updates will be included in the forum … for those interested!
Hello
Enrico

Hello

I’m using ireport 5.6.0 integrated with my sc project, but I have an accent problem with result of the query I send , I use utf8_bin of course

There is no problem with static texts made in ireport layout, just with data send by sc

This is the content of index.php

<?php

session_start();

include_once(‘class/tcpdf/tcpdf.php’);
include_once(‘class/PHPJasperXML.inc.php’);

$xml = simplexml_load_file($_SESSION[‘report’][‘xml_file’]); //variable for jrxml file

$PHPJasperXML = new PHPJasperXML();
$PHPJasperXML->debugsql=false;

$PHPJasperXML->arrayParameter=array(‘pdf_query’=>$_SESSION[‘report’][‘pdf_query’]); //variable for sql statement
$PHPJasperXML->xml_dismantle($xml);

$PHPJasperXML->transferDBtoArray($_SESSION[‘report’][‘host’],
$_SESSION[‘report’][‘user’],
$_SESSION[‘report’][‘pass’],
$_SESSION[‘report’][‘db’]);
$PHPJasperXML->outpage(“I”); //page output method I:standard output Download file

?>

Thanks
Nac

Hi,

someone an idea ??

Thanks

I do not know what to say because I use ireport with my function, then prepare the query internally to the report and sending the ‘where’ clause.
But if you have a problem with the syntax of the query that’s where you have to ‘fix’.
Have you tried to view the query before sending to ireport? testing it directly correct? ‘accent’ mean the single quote or accented letters? when you create pdf_query string uses the double quote to make way for single apex internally!
Try running the query before sending to ireport, maybe someone can help you better.
Hello.
Enrico

Hi Enrico

This is my problem :

the content of the field in db when I browse the table in phpmyadmin is “séjour” , in sc all applications show “s?jour” as it must be.
In grid app if I export, XLS, WORD, PRINT, etc… I see “s?jour”

in sc I work with utf8_bin, my db connection is utf8_bin, the field in table is utf8_bin .

I run the query that I send to ireports in phpmaydmin, and of course I see “séjour” !!!

so what I have to do when I send query to ireports ??

Nac

Hello
I tried to insert your string of ireport in my test database and it seems to work properly.
But I always use utf8_general_ci
This is the link that directed for the test:
http://devtools.dmatik.com/test_dm_ireport2php/dm_ireport2php/test1.php
I do not know if this can be of help!

Enrico

Thanks

but in my case, it doesn’t works.

… (y) …

[SIZE=14px]I have this problem with php 7.0.14… [/SIZE][SIZE=14px]someone help me?[/SIZE]

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PHPJasperXML has a deprecated constructor in /opt/NetMake/v9/wwwroot/htt/reports/class/PHPJasperXML.inc.php on line 4 [TABLE=“align: center, cellpadding: 2, cellspacing: 0”]
[TR=“bgcolor: #87ADDE”]
[TD=“colspan: 2, align: center”]Diagnosis[/TD]
[/TR]
[TR=“bgcolor: #959595”]
[TD=“colspan: 2, align: center”]Environment[/TD]
[/TR]
[TR=“bgcolor: #ffffff”]
[TD]ok[/TD]
[TD=“align: left”]PHP: 7.0.14[/TD]
[/TR]
[TR=“bgcolor: #f5f6f8”]
[TD]ok[/TD]
[TD=“align: left”]Hostname: srvdbcartago[/TD]
[/TR]
[TR=“bgcolor: #ffffff”]
[TD]ok[/TD]
[TD=“align: left”]SourceGuardian: 11.1.0[/TD]
[/TR]
[TR=“bgcolor: #f5f6f8”]
[TD]ok[/TD]
[TD=“align: left”]OS: LINUX SRVDBCARTAGO 4.4.0-78-GENERIC #99-UBUNTU SMP THU APR 27 15:29:09 UTC 2017 X86_64[/TD]
[/TR]
[TR=“bgcolor: #ffffff”]
[TD]ok[/TD]
[TD=“align: left”]WEB Server: Apache/2.4.25 (Unix) OpenSSL/1.0.1f mod_fastcgi/mod_fastcgi-SNAP-0910052141[/TD]
[/TR]
[TR=“bgcolor: #ffffff”]
[TD] [/TD]
[TD=“align: left”]ScriptCase Devel:[/TD]
[/TR]
[TR=“bgcolor: #f5f6f8”]
[TD] [/TD]
[TD=“align: left”]ScriptCase Build:[/TD]
[/TR]
[TR=“bgcolor: #ffffff”]
[TD] [/TD]
[TD=“align: left”]ScriptCase Prod: 9.0.004[/TD]
[/TR]
[/TABLE]

oscarquiroscoto

I am migrating from SC7 to SC9 and I find that no report works, I imagine that it came from the PHP side. Could you fix it?