субота, 23. септембар 2017.

jasper reports firewall centos suse

I was installing sql from remote oracle database 11g xe ( over sqlplus
to  10 g xe ( 32 byte open suse 11.3 linux from directorium structures from centos, main oracle database machine with oracle apex 5.1.1, to oracle 10g xe with apex 4.1.1 all remote, and set jasper reports integration, with closing firewall and prepare form secure printing.
firewal dont alow tomcat/glassfich port where is JasperReports.war deployed
so sny way how to pdf/excell/rtf can be showen is over blob.
On centos linux I was enabled only port from oracle apex listener, port from
glassfish 8080 is hiden as 4848, all to.
open suse is remote pc with 32 byte systems with apex 4.1.1 and have tomcat with java 1.6, disable too tomcat port 6080, only open port with oracle apex listener 8082, and sometimes open port 22221 form ssh, other access is with team viewer.
its report with calling procedure REQ_GET_REPORT_TUNNEL from page 5
no pass 6080 port. ON config files from tomcat, I was set locahost, where is tomcat apache and oracle 10 g install, same is with centos, with server glassfish version 4 and properties file on report folders. For exporting specific reports, its only need copy/paste as option from team viewer for repote files trasfers (or scp) into folders structures, and seting oracle pages to show this reports
All pages are login pasword secured on web, so this kind of reporting is very popular and easy to seting, and work perfect and stable.
Oracle API (https://docs.oracle.com/cd/E59726_01/doc.50/e39149/toc.htm) give very big options for manipulate files, depends on your needs, its simple plsql procedures, programmer could simple modify it for solve current problems.
With export print pages from form, there is need field from apex forms

with two proces is blob created and open window in current apex pages, way how to hide public jasper reports port and show report over internal apex feature


  xlog('PRC_SHOW_REPORT_TUNNEL', 'url (orig):' || :p5_report_url);

  xlib_jasperreports.show_report (p_rep_name                   => :p5_rep_name,
                                   p_rep_format                 => :p5_rep_format,
                                   p_data_source                => :p5_data_source,
                                   p_out_filename               => :p5_out_filename,
                                   p_rep_locale                 => :p5_rep_locale,
                                   p_rep_encoding               => :p5_rep_encoding,
                                   p_additional_params          => :p5_additional_params

  apex_application.g_unrecoverable_error := true;

  when others then
    xlog('PRC_SHOW_REPORT_TUNNEL', sqlerrm, 'ERROR');


   l_blob        BLOB;
   l_mime_type   VARCHAR2 (100);
   xlog ('PRC_GET_REPORT_TUNNEL', 'url (orig):' || :g_report_url);
   -- generate the report and return in BLOB
   xlib_jasperreports.set_report_url (:G_report_url);
                                (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));
   -- 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;

so with apex, can simple, export and import files in this or similar way, with strong apex API.

Нема коментара:

Постави коментар