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!

Howto save generated PDF (using BIP) directly into custom table as BLOB?

APEX RnD RoelandSep 4 2015 — edited Sep 5 2015

Hi,

I'm working on APEX 5.0.1 on the Oracle DB version 12C (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit)

We have an application that was initially created in APEX 4.1, but migrated to APEX 5.

Now we want to add some functionality.

In a report region (classic report) one of the columns is an image of the print icon that on-click starts a JS function.

This basically generates a PDF file using BI Publisher in the background.

Region query:

select '<a href="#" onclick="javascript:f_PrintReport('||dcl.ID||');"><img src="#IMAGE_PREFIX#print02.gif" alt="Print"></a>' as print

from my_custom_table;

Page level JS (HTML Header)

<script language="JavaScript" type="text/javascript">

<!--

   function f_PrintReport(declaratie_id)

  {

    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=SET_REPORT_PARAMETER',$v('pFlowStepId'));

    get.addParam('x01',declaratie_id);

    gReturn = get.get();

    get = null;

    // check the dest to run the correct report

        // run the report

     document.location.href = 'f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=DECL';

      }

//-->

</script>

It's making use of the Report Queries and Report Layouts in the shared components. This all works well.

But after generation, we want now to save the generated PDF as a BLOB in a custom table.

So I'm looking how I can 'capture' this output to store it directly in the DB.

Any tips out there?

thanks!

Roeland

This post has been answered by Jozef Demovic SVK on Sep 4 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2015
Added on Sep 4 2015
3 comments
1,125 views