This discussion is archived
1 2 3 4 Previous Next 47 Replies Latest reply: Jun 15, 2012 11:15 AM by DietmarAust RSS

Jasper Reports Integration - beta release

DietmarAust Oracle ACE
Currently Being Moderated
Hi guys,

I have finally found the time to release the Jasper Reports Integration package for producing print ready reports.

You can find all the details here: http://daust.blogspot.com/2010/01/jasper-reports-integration-beta-release.html

Anybody is welcome to try the software and join the beta program.

Thanks,
~Dietmar.
  • 1. Re: Jasper Reports Integration - beta release
    JoL Newbie
    Currently Being Moderated
    Hi Dietmar,
    great work!!!

    I tried the Jasper Reports Integration installation instructions but i had 2 problems :
    1. When i run the installation script @user_install.sql, i got an error because there are the oracle db user also (CREATE OR REPLACE PACKAGE XLIB3."XLIB_JASPERREPORTS"), so i removed the XLIB3 from the declaration of package specification and body;
    2. When i start Tomcat (6.0.18) i got the error
    Error deploying configuration descriptor JasperReportsIntegration.xml
    java.net.SocketException: Network is unreachable: connect

    So i tried to comment the tag
    <!DOCTYPE web-app PUBLIC
         "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
         "http://java.sun.com/dtd/web-app_2_3.dtd">

    and it work fine (i think there is a problem because i pass through a proxy).

    Thanks,
    Sergio
  • 2. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Hi Sergio,
    CREATE OR REPLACE PACKAGE XLIB3."XLIB_JASPERREPORTS
    thanks for catching this one. The last export of the package was a manual operation ;).

    Interesting that you could fix the second problem by removing the doctype, never had a problem with that one.

    I have updated the files and will publish the update later today.

    Aside from that, did you get it to work?

    All feedback is welcome, also where the instructions might be wrong, confusing or misleading.

    Thanks,
    ~Dietmar.
  • 3. Re: Jasper Reports Integration - beta release
    JoL Newbie
    Currently Being Moderated
    Yes Dietmar,
    solved the 2 issues, the integration woks very well.

    Thanks a lot,
    Sergio
  • 4. Re: Jasper Reports Integration - beta release
    296107 Newbie
    Currently Being Moderated
    Hello Dietmar,

    i could successfully install the Integration Package.

    When i run the apex test application the button (show report directly) works as expected, the other buttons generates an error Message:

    ORA-06550: Zeile 4, Spalte 3: PLS-00201: Bezeichner 'XLIB_JASPERREPORTS.SET_REPORT_URL' muss deklariert werden ORA-06550: Zeile 4, Spalte 3: PL/SQL: Statement ignored ORA-06550: Zeile 5, Spalte 3: PLS-00201: Bezeichner 'XLIB_JASPERREPORTS.SHOW_REPORT' muss deklariert werden ORA-06550: Zeile 5, Spalte 3: PL/SQL: Statement ignored

    What can i do?

    regards,
    Wolfgang
  • 5. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Hi Wolfgang,

    did you use the same oracle user for both the installation and the parsing schema of the test application?

    E.g. when you install the database packages into the schema HR then you should use HR as the parsing schema for the test application.

    Cheers,
    ~Dietmar.
  • 6. Re: Jasper Reports Integration - beta release
    296107 Newbie
    Currently Being Moderated
    Hi,

    yes, i installed them in the same Oracle Schema!

    My environment:

    Oracle XE on RedHat Enterprise Linux 5.2, Tomcat 5.5.27
    APEX 3.1.2.00.02

    regards,
    Wolfgang
  • 7. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Hi Wolfgang,

    you ran into the same problem as Sergio in this thread (see the post above).

    The files xlib_jasperreport.pks and xlib_jasperreport.pkb reference the schema XLIB3, which it shouldn't.

    You can change that in the files in the subdirectory sql/xlib_jasperreports and install the package spec and body again.

    You can also find the updated version here: http://www.opal-consulting.de/downloads/free_tools/JasperReportsIntegration/JasperReportsIntegration-0.8.0.1.zip

    Best regards,
    Dietmar.
  • 8. Re: Jasper Reports Integration - beta release
    296107 Newbie
    Currently Being Moderated
    Hi Dietmar,

    i downloaded the updated package and made a fresh install on Oracle XE.

    Now it works as expected!

    Great work, this helps me a lot in getting solutions for a few customers!

    I would like to save the report in a user table with a blob field, how can this be achieved?


    Many thanks,
    Wolfgang

    BTW: do you plan any additional features ?

    Edited by: brungert on 16.01.2010 09:02
  • 9. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Hi Wolfgang,
    Now it works as expected!
    That's the way I like it ;).
    I would like to save the report in a user table with a blob field, how can this be achieved?
    Easy, this is even already part of the test application.

    On the Report Tester tab you will find a button called "Get report as BLOB, then display". It calls the following page process:
    DECLARE
       l_blob        BLOB;
       l_mime_type   VARCHAR2 (100);
    BEGIN
       xlog ('PRC_GET_REPORT_TUNNEL', 'url (orig):' || :p5_report_url);
       ------------------------------------------------------------------------
       -- generate the report and return in BLOB
       ------------------------------------------------------------------------
       xlib_jasperreports.set_report_url (:p5_jasper_report_url);
       xlib_jasperreports.get_report
                                    (p_rep_name               => :p5_rep_name,
                                     p_rep_format             => :p5_rep_format,
                                     p_data_source            => :p5_data_source,
                                     p_rep_locale             => :p5_rep_locale,
                                     p_rep_encoding           => :p5_rep_encoding,
                                     p_additional_params      => :p5_additional_params,
                                     p_out_blob               => l_blob,
                                     p_out_mime_type          => l_mime_type
                                    );
       ------------------------------------------------------------------------
       -- set mime header
       ------------------------------------------------------------------------
       OWA_UTIL.mime_header (ccontent_type      => l_mime_type,
                             bclose_header      => FALSE);
       ------------------------------------------------------------------------
       -- set content length
       ------------------------------------------------------------------------
       HTP.p ('Content-length: ' || DBMS_LOB.getlength (l_blob));
       OWA_UTIL.http_header_close;
       ------------------------------------------------------------------------
       -- download the file and display in browser
       ------------------------------------------------------------------------
       WPG_DOCLOAD.download_file (l_blob);
       ------------------------------------------------------------------------
       -- release resources
       ------------------------------------------------------------------------
       DBMS_LOB.freetemporary (l_blob);
       ------------------------------------------------------------------------
       -- stop rendering of APEX page
       ------------------------------------------------------------------------
       apex_application.g_unrecoverable_error := TRUE;
    EXCEPTION
       WHEN OTHERS
       THEN
          xlog ('PRC_GET_REPORT_TUNNEL', SQLERRM, 'ERROR');
          RAISE;
    END;
    Once you have the blob you can store it in a database table, done!

    There is only one tricky part. Should the Tomcat throw an exception then it will return a html error page (http code 200=ok). The request is perfectly valid but a human can see the error message.

    The API should throw an exception on that. A bit tricky once other J2EE servers are supported or the error messages vary.
    BTW: do you plan any additional features ?
    Perhaps, what are you looking for?

    Cheers,
    ~Dietmar.
  • 10. Re: Jasper Reports Integration - beta release
    296107 Newbie
    Currently Being Moderated
    Hi Dietmar,

    i have a look at "Get report as BLOB, then display".

    Great work,

    thanks,
    Wolfgang
  • 11. Re: Jasper Reports Integration - beta release
    AndyPol Expert
    Currently Being Moderated
    I have tested your big work : ) In my opinion it's big step for APEX and Jasper. I used both as separated tools but based on the same database. In this moment it was changed. Great JOB.

    [APEX.dbe.pl]
  • 12. Re: Jasper Reports Integration - beta release
    296107 Newbie
    Currently Being Moderated
    Hi Dietmar

    i can run and save the resulting pdf file in a blob field in a user-table, great!

    Is it possible to upload a report.jasper file to the tomcat server ?

    Many thanks,
    Wolfgang

    Edited by: brungert on 20.01.2010 22:46
  • 13. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Hi Wolfgang,
    brungert wrote:
    Is it possible to upload a report.jasper file to the tomcat server ?
    well, this is currently not supported but an interesting enhancement option.

    This approach does have a few security implications, though. But I will look into it.

    Cheers,
    Dietmar.
  • 14. Re: Jasper Reports Integration - beta release
    DietmarAust Oracle ACE
    Currently Being Moderated
    Did anybody try to install and run it on 11.1 or 11.2?

    Is it working out of the box or do I need additional instructions on how to make it work on 11.x?

    Thanks,
    Dietmar.
1 2 3 4 Previous Next