No announcement yet.

dm_ireport2php: advanced features for Jasper iReport

  • Filter
  • Time
  • Show
Clear All
new posts

  • dm_ireport2php: advanced features for Jasper iReport

    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
    Other features are in the works to this vers. 1:00
    All usable for any use and purpose.

    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
    Alte caracteristici sunt în lucrările acestui Vers. 1:00
    Toate utilizabile pentru orice utilizare și scop.

    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 Senza dilungarmi nell'elenco delle funzionalitŕ, ho messo tutti i download necessari, doc e gli script per i test in
    Sono in lavorazione altre funzionalitŕ a questa vers. 1.00
    Tutto utilizzabile per qualsiasi uso e scopo.

  • #2
    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.


    Professional Scriptcase Services
    Some Customers opinions


    • #3
      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!


      • #4

        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




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

        $PHPJasperXML = new PHPJasperXML();

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

        $PHPJasperXML->outpage("I"); //page output method I:standard output Download file




        • #5

          someone an idea ??



          • #6
            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.


            • #7
              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 ??


              Last edited by nacyil; 08-12-2016, 03:17 AM.


              • #8
                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:
                I do not know if this can be of help!



                • #9

                  but in my case, it doesn't works.


                  • #10

                    I have this problem with php 7.0.14.. someone help me?

                    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/ on line 4
                    ok PHP: 7.0.14
                    ok Hostname: srvdbcartago
                    ok SourceGuardian: 11.1.0
                    ok OS: LINUX SRVDBCARTAGO 4.4.0-78-GENERIC #99-UBUNTU SMP THU APR 27 15:29:09 UTC 2017 X86_64
                    ok WEB Server: Apache/2.4.25 (Unix) OpenSSL/1.0.1f mod_fastcgi/mod_fastcgi-SNAP-0910052141
                    ScriptCase Devel:
                    ScriptCase Build:
                    ScriptCase Prod: 9.0.004


                    • #11

                      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?
                      Leandro Carames