Home » Developer & Programmer » Forms » Direct Print (Oracle Forms 10g, Windows)
icon7.gif  Direct Print [message #585674] Wed, 29 May 2013 00:39 Go to next message
MahdiAbuHassan
Messages: 7
Registered: May 2013
Location: Bahrain
Junior Member
I want to print a report to the printer directly. The main issue is that I don't want the user to save the report to prevent reprint of legal Order. Below is my code to produce 'PDF' format. Please help me to accomplish my task.

PROCEDURE
run_report_proc (rep_id report_master.REPORT_ID%type,pl_id ParamList ) IS
repid REPORT_OBJECT;
rep_name report_master.REPORT_NAME%type;
v_rep varchar2(1000);
rep_status varchar2(20);
rep_acc char(1);

BEGIN
if rep_id is not null then
begin
select REPORT_NAMe into rep_name from report_master where REPORT_ID = rep_id ;
-- rep_name := 'can_letter2';
exception
when others then
:cnt_blk.msgfld := 'Invalid Report Id ' ;
raise form_trigger_failure;
end;

repid := FIND_REPORT_OBJECT('REP_OBJ');
set_report_object_property(repid,REPORT_FILENAME,'/appsys/ROADCIS/reports/' ||rep_name);
set_report_object_property(repid,REPORT_SERVER,:global.report_server);
set_report_object_property(repid,REPORT_DESTYPE,CACHE);
-- set_report_object_property(repid,REPORT_DESTYPE,screen);

set_report_object_property(repid,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'PDFEMBED=no');
v_rep := RUN_REPORT_OBJECT(repid, PL_ID);
rep_status := REPORT_OBJECT_STATUS(v_rep);
while rep_status = 'RUNNING' loop
rep_status := REPORT_OBJECT_STATUS(v_rep);
end loop;
:CNT_BLK.MSGFLD:=rep_status;
web.show_document(:global.report_url ||'reports/rwservlet/getjobid' || substr(v_rep,:global.rro) || '?server=' ||:global.report_server, '_blank');

:b010.CMS_RePrint := 'N';
Commit_Form;
else
:cnt_blk.msgfld := 'Inavlid Report ID ' ;
RAISE Form_Trigger_Failure;
end if;
end;
Re: Direct Print [message #585676 is a reply to message #585674] Wed, 29 May 2013 01:01 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
DESTYPE should be PRINTER, not CACHE (nor SCREEN).
Re: Direct Print [message #585678 is a reply to message #585676] Wed, 29 May 2013 01:21 Go to previous messageGo to next message
MahdiAbuHassan
Messages: 7
Registered: May 2013
Location: Bahrain
Junior Member
Dear Littlefoot,

Thanks for your kind attention.

I have tried that but no output is produced.

Re: Direct Print [message #585680 is a reply to message #585678] Wed, 29 May 2013 01:44 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Have a look at this example; maybe it'll help. Also, review other search results for "oracle reports print directly to printer".
Previous Topic: Concatenate or copy value on enter or WVI
Next Topic: copy the val of previes item into next item
Goto Forum:
  


Current Time: Thu Apr 25 04:34:26 CDT 2024