Home » Developer & Programmer » Forms » Report Printing accros Domain (Oracle 10g Rel 2)
icon4.gif  Report Printing accros Domain [message #349782] Tue, 23 September 2008 02:04 Go to next message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
Dear all,

The Situation

I have a RDF in ora 10g rel 2
I can print on the local printer (default) printer directly


requirement
I need to print on a local printer on a different domain other than the apps server

for eg

apps01.it.md.sf is the apps server
a client with address PC01475.it.md.sf is connected with a printer with printer name print01.it.md.sf

a client in another domain called : pc08898.rf.md.sf with an attached printer called print02.rf.md.sf

the print command issued from pc08890.rf.md.sf on the print02.rf.md.sf cannot print

where as

the print command issued from PC01475.it.md.sf on the print01.it.md.sf can print

What should i do to print this
has any one come accross such situation
has any one printed on a cross domain

We are using Apps server 10g rel 2
dev ver 10g rel2
o/s on apps is windows 2003
o/s on client is win XP

Re: Report Printing accros Domain [message #349794 is a reply to message #349782] Tue, 23 September 2008 02:42 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
The AS can only print on a printer which it knows about. If you can define on the AS box a queue for the local printer on another domain then you will be able to print on it.

David
Re: Report Printing accros Domain [message #360021 is a reply to message #349782] Wed, 19 November 2008 04:45 Go to previous messageGo to next message
myclassic
Messages: 127
Registered: December 2006
Location: Pakistan
Senior Member
how to print on local machine.

i am still unable to find any solution to print even on local machine.

please help me in this regard.
Re: Report Printing accros Domain [message #360178 is a reply to message #360021] Thu, 20 November 2008 00:11 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I have never been able to get the local printer to be addressable. I have created the output as a pdf and then printed the pdf manually on the local printer.

David
Re: Report Printing accros Domain [message #360694 is a reply to message #360021] Sat, 22 November 2008 08:56 Go to previous message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
We found the Solution as mentioned by Mr. Martin,

If you need to print directly on the printer to any domain it is very simple.
1. Printer should be shared and properly configured
2. Report Server should be configured
3. There should not be any blanks, spaces or underscores, hypens or special characters in the printer name

here is a sample code which works

declare
pl_id ParamList ;
mstat char (1) := ' ' ;
x number ;
tag varchar2 (20) := ' ' ;
REPID REPORT_OBJECT ;
V_REP VARCHAR2(100) ;
REP_STATUS VARCHAR2(20) ;
begin
:GLOBAL.PATH := '\\APS_SERVER\FOLDERNAME\';
-- the absolute path of the RDF/REP report file available in the application server
:global.repserver := 'REPSERVER_NAME' -- name of the report server
:global.printer := '\\PCNAME\PRINTER_NAME';
----------------------------------------------------------------------------------
-- Printer_name is the name of the printer on your local machine
-- The printer should be a whole name like 'HPCOLOR6L'
-- The printer should be shared, and should not have blanks or other special chars
-- --------------------------------------------------------------------------------
tag := 'XX' || to_char (sysdate , 'YYYYDDMMHHMISS') ;
pl_id := get_parameter_list (tag) ;
IF NOT Id_Null (pl_id) THEN
Destroy_Parameter_List (pl_id) ;
END IF ;
pl_id := Create_Parameter_List (tag) ;
add_parameter (pl_id , 'paramform' , text_parameter , 'NO') ;
REPID := FIND_REPORT_OBJECT('rep010_bpass') ; -- name of the report where it should be definded in the report section of the Oracle forms builder
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_FILENAME,:GLOBAL.PATH || 'rep010_bpass') ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_EXECUTION_MODE,RUNTIME) ;
SET_REPORT_OBJECT_PROPERTY (REPID,REPORT_COMM_MODE,SYNCHRONOUS) ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_DESTYPE,PRINTER) ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_DESNAME,:GLOBAL.PRINTERNAME) ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_SERVER,:GLOBAL.REPSERVER) ;
V_REP := RUN_REPORT_OBJECT(REPID,pl_id) ;
REP_STATUS := REPORT_OBJECT_STATUS(V_REP) ;
WHILE REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
REP_STATUS := REPORT_OBJECT_STATUS(V_REP) ;
END LOOP ;
IF REP_STATUS = 'FINISHED' THEN
--WEB.SHOW_DOCUMENT('http://'||:GLOBAL.HOST||':'||:GLOBAL.PORT||'/reports/rwservlet/getjobid'|| substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||:GLOBAL.REPSERVER||:GLOBAL.PARAM, '_blank') ;
NULL ;
ELSE
MESSAGE ('Error Running Report ...') ;
MESSAGE ('Error Running Report ...') ;
END IF ;

end ;
Previous Topic: Query Mode
Next Topic: WebUtil - MailMerge
Goto Forum:
  


Current Time: Mon Dec 05 19:00:44 CST 2016

Total time taken to generate the page: 0.06868 seconds