Announcement

Collapse
No announcement yet.

dm_ireport2php: advanced features for Jasper iReport

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 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
    Sono in lavorazione altre funzionalitŕ a questa vers. 1.00
    Tutto utilizzabile per qualsiasi uso e scopo.
    Ciao
    Enrico

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

    Congrats.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #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!
      Hello
      Enrico

      Comment


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

        Comment


        • #5
          Hi,

          someone an idea ??

          Thanks

          Comment


          • #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.
            Hello.
            Enrico

            Comment


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

              Nac

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

              Comment


              • #8
                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_i...2php/test1.php
                I do not know if this can be of help!

                Enrico

                Comment


                • #9
                  Thanks

                  but in my case, it doesn't works.


                  Comment

                  Working...
                  X