Skip to Main Content

Oracle Forms

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!

Oracle report directly to printer not working....

Su.giJan 9 2017 — edited Jan 13 2017

Hi Experts,

  I am developing an application using Oracle Forms and Reports.

I have created report and called in forms.

I need to send the output to the printer directly. I am using the below code.

declare

report_id report_object;

v_repserver     varchar2(200):= :GLOBAL.report_service;

v_report varchar2(50):= :GLOBAL.rpt_id;

v_desformat     varchar2(30):= 'hpl.prt';

v_printer       varchar2(200) := '\\192.168.0.179\hpserver';

param_list ParamList;

param_name VARCHAR2(50):= 'rpt_data';

rep_status varchar2(200);

BEGIN

       

report_id:=FIND_REPORT_OBJECT(v_report);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE, RUNTIME);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE, ASYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE, printer);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESNAME,v_printer);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,v_desformat);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,v_repserver);

SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME, 'D:\RDF\APM01.RDF');

param_list := Get_Parameter_List(param_name);

  IF NOT Id_Null(param_list) THEN

    Destroy_Parameter_List(param_list);

  END IF;

param_list := Create_Parameter_List(param_name);

Add_Parameter(param_list,'PARAMFORM',TEXT_PARAMETER,'NO');

rep_status :=RUN_REPORT_OBJECT(report_id,param_list);

END;

In my report queue it shows error like below

The report generated successfully but distribution to destinations failed.

How to solve my issue....Is there i missed anything?

Thanks in advance,

Su.gi

This post has been answered by Su.gi on Jan 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2017
Added on Jan 9 2017
6 comments
631 views