Report Printing accros Domain [message #349782] |
Tue, 23 September 2008 02:04 |
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 #360694 is a reply to message #360021] |
Sat, 22 November 2008 08:56 |
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 ;
|
|
|