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!

How to print a jasper report from an On-Demand-Process

GhanaApexDeveloperAug 7 2013 — edited Aug 8 2013

Hi Guys,

i have a report with a parameter that i would like to print out  from an On demand Process.When there is an Ajax Call Return. i want the report to show before printing.

Here is an example of the code used

DECLARE

   l_customerid varchar2(200);

BEGIN

  l_customerid:= wwv_flow.g_x01;

select product_id

      into pid

      from products

     where upper(product_name) = upper(l_productname);

xlib_jasperreports.set_report_url('http://localhost:8181/JasperReportsIntegration/report');

xlib_jasperreports.show_report (p_rep_name   => 'InvoiceCash',

                                  p_rep_format   => 'pdf',

                                  p_data_source  => 'default',

                                  p_out_filename  => 'Invoice Cash Receipt',

                                  p_additional_params  => 'p_customerid='||l_customerid

                                  );

apex_application.g_unrecoverable_error := true;

END;

Thanks

Benjamin.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2013
Added on Aug 7 2013
4 comments
639 views