Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need the pdf file to be stored directly in database using jasper

susfJul 16 2012 — edited Jul 17 2012
I am using jasper integration package ..from www.opal-consulting.de
using apex 4 and i Am currently able to generate pdf invoice..using jasper and store in a database.. table.

I need to generate the pdf invoice in the background ..without dispalying in my screen..
Without downloading on my machine..And store directly into the database table..
*..*

Is it possible..
Any information is highly appreicated..


Below is my existing part of code..Kindly guide.


DECLARE
l_blob BLOB;
l_mime_type VARCHAR2 (100);
l_blob2 BLOB;
l_mime_type2 VARCHAR2 (100);
mport varchar2(200);
mrserver varchar2(20);
BEGIN
warn('fsubdno'||:P103_SUBSCRIBERDNO);
commit;
mrserver := rserver();
mport := 'http://'||mrserver||'/JasperReportsIntegration/report';


------------------------------------------------------------------------
-- generate the report and return in BLOB
------------------------------------------------------------------------
xlib_jasperreports.set_report_url (mport);
warn('firststrikeeee');

xlib_jasperreports.get_report
(p_rep_name => 'reinvx',
p_rep_format => 'pdf',
p_data_source => 'chess',
p_rep_locale => 'de_DE',
p_rep_encoding => 'UTF-8',
p_additional_params => '&Psubscribe_no='||:P103_SUBSCRIBER_NO||'&Psubscribed_no='||:P103_SUBSCRIBERDNO,
p_out_blob => l_blob,
p_out_mime_type => l_mime_type
);
WPG_DOCLOAD.download_file (l_blob);
warn('secondstrikeee');

WPG_DOCLOAD.download_file (l_blob);
BLOB_LOADB (mid(),:p103_subscriber_no,null,'renewal_invoice','renewalinv'||:p103_subscriber_no,l_mime_type,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;

Edited by: susf on Jul 16, 2012 8:47 AM
This post has been answered by evrm on Jul 17 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2012
Added on Jul 16 2012
9 comments
627 views