I was installing sql from remote oracle database 11g xe (11.2.0.1) over sqlplus
to 10 g xe (10.2.0.1) 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
to 10 g xe (10.2.0.1) 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
additional parameters on form could be load from previous pages, report, when user determine which row could be need form reports, fo rexample :P2_ID then, with coincatanated all this fields 8 is all field look as: url http://127.0.0.1:6080/JasperReportsIntegration/report?_repName=test&_repFormat=rtf&_dataSource=default&_outFilename=myTest.pdf&_repLocale=de_DE&_repEncoding=UTF-8 where is test.jrxml report build by iReport designer, and put on foldeers structure for tomcat/glassfish With granted utl_http from oracle api to current user where apex page exist, need code with java script who mapped apex fieldwith oracle API-s function for creating blob file as export options. (Its simple do reverse, import brom external source to database as blob) and with this 5 functions is mapping and open window and connect to external application process proces (xlibShowUrlTunnel): | function setValue(pItemName, pValue){ $x(pItemName).value = pValue; xlibJasperDemo_makeDemoUrl(); return false; } function xlibJasperDemo_generateUrl(pBaseUrl, pRepName, pRepFormat, pDataSource, pOutFilename, pRepLocale, pRepEncoding, pAdditionalParams){ var url; url = pBaseUrl; url = url + "?_repName=" + pRepName; url = url + "&_repFormat=" + pRepFormat; url = url + "&_dataSource=" + pDataSource; url = url + "&_outFilename=" + pOutFilename; url = url + "&_repLocale=" + pRepLocale; url = url + "&_repEncoding=" + pRepEncoding; if (pAdditionalParams) url = url + "&" + pAdditionalParams; return url; } function xlibJasperDemo_makeDemoUrl(){ $x('P5_REPORT_URL').value=xlibJasperDemo_generateUrl('&G_REPORT_URL.', $x('P5_REP_NAME').value, $x('P5_REP_FORMAT').value, $x('P5_DATA_SOURCE').value, $x('P5_OUT_FILENAME').value, $x('P5_REP_LOCALE').value, $x('P5_REP_ENCODING').value, $x('P5_ADDITIONAL_PARAMS').value ); } function xlibShowUrl(pUrl){ window.open(pUrl); return false; } function xlibShowUrlTunnel(pUrl){ var newUrl; alert(pUrl); // !!! use encodeURIComponent, not escape !!! newUrl = encodeURIComponent(pUrl.replace(/:/gi,'|')); alert(newUrl); newUrl = 'f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=prc_show_url:::F_TMP_1:' + newUrl; alert(newUrl); window.open(newUrl); return false; } |
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
1) PRC_SHOW_REPORT_TUNNEL
begin
xlog('PRC_SHOW_REPORT_TUNNEL', 'url (orig):' || :p5_report_url);
xlib_jasperreports.set_report_url(:G_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;
exception
when others then
xlog('PRC_SHOW_REPORT_TUNNEL', sqlerrm, 'ERROR');
raise;
end;
2) PRC_GET_REPORT_TUNNEL
DECLARE
l_blob BLOB;
l_mime_type VARCHAR2 (100);
BEGIN
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);
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;
so with apex, can simple, export and import files in this or similar way, with strong apex API.
Нема коментара:
Постави коментар