Very Urgent! Print Report output to local printer on button click in form
In Sales Order Form there is a print receipt button. In current situation On Clicking the 'Print Receipt Button' it submits a XML Publisher report(PDF output) to the concurrent manager. Currently to print that report i need to go view--> requests--> view output and then print. According to my new Requirement i need to print that report directly to local printer on one simple Print receipt button click in form.
I am trying to call the printers on server using custom.pll. The report is running successfully but it is not printing output to the local printer. I need to print the report to the local printers based on responsibility. Local printers are available on apps server. Can anyone help me on this issue ASAP.
Is it possible to print the document using custom.pll? Is there any other alternative to print the report on simple button click in form.
Environment: Apps 11.5.10.2, Forms 6i
Here is the code that i am using in my custom.pll.
if (v_form_name = 'OEXOETEL' --and v_block_name = 'LINES_SUMMARY'
and name_in('parameter.ACTIONS') = 'PAYMENT_RECEIPT' )THEN
l_organization_id := Name_In('PARAMETER.OE_ORGANIZATION_ID');
l_order_header_id := Name_In('ORDER.header_id');
select to_number(oe_sys_parameters.value ('SET_OF_BOOKS_ID')) into l_sob_id from dual;
xml_layout := FND_REQUEST.ADD_LAYOUT('XXAFP','XXAFPOEXPMTRCRTF','en','US','PDF');
select a.profile_option_value
into v_printer_name
from fnd_profile_option_values a
, fnd_profile_options b
, fnd_profile_options_tl c
, fnd_user fu
where a.profile_option_id = b.profile_option_id
and c.profile_option_name = b.profile_option_name
and fu.user_id (+) = a.level_value
and c.language = 'US'
and c.user_profile_option_name='Printer'
and a.level_id = 10003 ;
if (FND_SUBMIT.SET_PRINT_OPTIONS(v_printer_name, 'Portrait', 2, TRUE, 'N'))
then
l_new_request_id := FND_REQUEST.SUBMIT_REQUEST('XXAFP','XXAFPOEXPMTRC',
null,null,FALSE,l_sob_id,l_organization_id,NULL,NULL,l_order_header_id,
chr(0), '', '', '', '', '', '', '', '', '', '',
end if;
fnd_message.set_string('Request Submitted for Custom Payment Receipt. Request ID is '||l_new_request_id);
fnd_message.show;
copy('NULL','parameter.ACTIONS');
IF (l_new_request_id = 0) THEN
FND_MESSAGE.RETRIEVE;
FND_MESSAGE.ERROR;
else
l_commit_result := APP_FORM.QuietCommit;
END IF;
I need to complete this requirement immediately. Can anyone suggest me better ways in doing this.
Thanks,
Srinivas
I solved this problem myself using shell script through custom.pll. I wrote shellscript and called that shellscript through FND_REQUEST.SUBMIT_REQUEST.It printed 2 copies to local printer.
Similar Messages
-
Print report on network/local printer(plz help)
Plz Forms gurus, help me to solve this problem it's very very importante for me
We have at a lot application witch work in client/server mode using forms/Reports 6i.With these applications we haven't problem to print report on printer using RUN_PRODUCT.Now we want to migrate on Forms/Reports 9i.When we use Run_Report_Object to print report on network print, we are encountring problems, the following errors occurs:
REP-713: Printer name '\DT_C2_0_8102\LaserJet1100' is wrong in the parameter DESNAME.
LaserJet1100 is a network printer install on the machine witch have DT_C2_0_8102 in the network.
I would like to know, if there an other way for naming printer? Secondly, i would like to if i add a network printer on my machin and define it as my default printer. Am i obliged to define the parameter DESNAME in the call off RUN_REPORT_OBJECT. If someone have a sample code about how to print on printer, it'll be helpfull.
Plz forms gurus help me to solve my problem.
Thanks in advance.
TYAGDuplicate?
Print report on network/local printer -
Print report on network/local printer
Hi forms gurus,
I repost this topic because it's very important to me.We have at a lot application witch work in client/server mode using forms/Reports 6i.With these applications we haven't problem to print report on printer using RUN_PRODUCT.Now we want to migrate on Forms/Reports 9i.When we use Run_Report_Object to print report on network print, we are encountring problems, the following errors occurs:
REP-713: Printer name '\DT_C2_0_8102\LaserJet1100' is wrong in the parameter DESNAME.
LaserJet1100 is a network printer install on the machine witch have DT_C2_0_8102 in the network.
I would like to know, if there an other way for naming printer? Secondly, i would like to if i add a network printer on my machin and define it as my default printer. Am i obliged to define the parameter DESNAME in the call off RUN_REPORT_OBJECT. If someone have a sample code about how to print on printer, it'll be helpfull.
Plz forms gurus help me to solve my problem.
Thanks in advance.
TYAGHi Franck,
Excuse me to repost the same topic.I did it because it's very important to me to solve this problem.
I do what u said by change the value of DESNAME parameter in '\\DT_C2_0_8102\LaserJet1100' but the same error happen.
Here is the code the function i use to print report:
FUNCTION Run_Synchrone (P_robject VARCHAR2,P_rserver VARCHAR2,P_rformat VARCHAR2,P_rdestype NUMBER,P_rdesname VARCHAR2,P_rfilename VARCHAR2,P_rother BOOLEAN,P_rother_params VARCHAR2,P_rservlet VARCHAR2,P_message_out OUT VARCHAR2) RETURN BOOLEAN IS
V_rid REPORT_OBJECT;--Id du report object
--V_rmessage VARCHAR2(100) :='';
V_rmessage VARCHAR2(100) :=NULL;--valeur de retour run_report_object
--V_rstatus VARCHAR2(100) :='';
V_rstatus VARCHAR2(100) :=NULL;--Statuts de l'execution
--V_Jobid VARCHAR2(4000) :='';
V_Jobid VARCHAR2(4000) :=NULL;--id du job d'édition
--hidden_action VARCHAR2(2000) :='';
--V_other_Param VARCHAR2(4000) :='';
V_other_Param VARCHAR2(4000) :=NULL;--Autre parametre utililasteur
V_user_connect VARCHAR2(255):=GET_APPLICATION_PROPERTY(username)||'/'||GET_APPLICATION_PROPERTY(password)||'@'||GET_APPLICATION_PROPERTY(connect_string);--utilisateur connecté
v_report_url VARCHAR2(100);
V_Ret_Val BOOLEAN;--Valeur de retour de la fonctio,
BEGIN
V_rid:=FIND_REPORT_OBJECT(P_robject);
-- setting Reports runtime parameters
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_FILENAME,P_rfilename);
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_SERVER,P_rserver);
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_DESTYPE,P_rdestype);
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_DESNAME,P_rdesname);
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_DESFORMAT,P_rformat);
--Autre parametre par defaut= userid
V_Other_Param:='userid='||V_user_connect;
--Test si autre paramètre applicatif
IF P_rOther THEN
V_Other_Param:=V_Other_Param||P_rother_params;
END IF;
SET_REPORT_OBJECT_PROPERTY(V_rid,REPORT_OTHER,V_Other_Param);
V_rmessage := RUN_REPORT_OBJECT(V_rid);
V_rstatus := REPORT_OBJECT_STATUS(V_rmessage);
--Test d'éxécution de l'état
IF V_rstatus='FINISHED' THEN--Aucune erreur
P_message_out:=P_rfilename||' édition terminée avec succès';
V_Ret_Val:=TRUE;
ELSE--Erreur quelconque.
--handle errors
P_message_out:=V_rstatus||': '||P_rfilename||' édition annulée...';
V_Ret_Val:=FALSE;
END IF;
RETURN(V_Ret_Val);
END;
And is how i call it:
V_Edition:=Web_Edition.Run_Synchrone ('RO_FM_DMP6',:GLOBAL.rserver,'PDF',PRINTER,'\\DT_C2_0_8102\LaserJet1100',P_File,TRUE,V_user_params,:GLOBAL.rservlet,V_Mess_Out);
What's the problem.Perhaps the problem reside in how i install the printer on the machin where i try to print.What steps must i follow to install it.
PLZ HELP! -
Directly Printing the Reports Output to a Printer in 10g.
Hi All,
We need to print directly from the reports to a printer. How it can be achieved?
i.e Reports running in client machine and when I hit the Run Button in my form the report runs. Similarly the report output should be printed to the printer attached to the Server PC where reports server is running.
How this can be achieved without much of complication. We have achieved this changing the existing servlet of report which does this. But is it possible to achieve this on other ways too.
Appreciate early responses and awaiting for it.
ThanksHi,
Many Thanks. I checked the URL its very descriptive and helpful.
Meanwhile when i try to configure printer from the application server it asks for the network userid and password. What is that which i should provide? Either its the local user account of that PC or the administrator user on which the oracle services run.
Please clarify.
Thanks in advance. -
Re : how to print report output in DOT MATRIX printer
Hai
how to print report output in DOT MATRIX printer.
Thanks
maniCheck this
[http://help.sap.com/saphelp_nw04/helpdata/en/90/78f078030211d399b90000e83dd9fc/frameset.htm]
also check the SAP Note 129581 -
How to print report on client default printer ?
I develop web application. I use jdev 10.1.3.4.0 . I can print report in PDF format.
My Problem
I can't print report on client default printer. when Client run application and print. Report is printed at server default printer
How can I do.
_My source code for print to PDF format._
FacesContext context = FacesContext.getCurrentInstance();
response = (HttpServletResponse)context.getExternalContext().getResponse();
String urlSchema = "jdbc:oracle:thin:@localhost:1521:ORCL";
String schemaName = "hr";
String schemaPass = "hr;
reportPath = "D:\\Project\\Reports";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(urlSchema, schemaName, schemaPass);
reportPath = reportPath.endsWith("\\") ? reportPath : (reportPath + "\\");
input = new File(reportPath + reportName + ".jasper");
reportParameters.put("SUBREPORT_DIR", reportPath);
reportParameters.put("P_IMAGE_PATH", reportPath);
jasperPrint = JasperFillManager.fillReport(input.getPath(), reportParameters, conn);
response.setContentType("application/pdf");
response.addHeader("Content-Disposition", "attachment;filename=" + reportNameOutput + ".pdf");
OutputStream outputStream = response.getOutputStream();
JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream);
outputStream.flush();
outputStream.close();
conn.close();{code}
_My source code for print to *printer*._
{code}FacesContext context = FacesContext.getCurrentInstance();
response = (HttpServletResponse)context.getExternalContext().getResponse();
String urlSchema = "jdbc:oracle:thin:@localhost:1521:ORCL";
String schemaName = "hr";
String schemaPass = "hr;
reportPath = "D:\\Project\\Reports";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(urlSchema, schemaName, schemaPass);
reportPath = reportPath.endsWith("\\") ? reportPath : (reportPath + "\\");
input = new File(reportPath + reportName + ".jasper");
reportParameters.put("SUBREPORT_DIR", reportPath);
reportParameters.put("P_IMAGE_PATH", reportPath);
jasperPrint = JasperFillManager.fillReport(input.getPath(), reportParameters, conn);
JasperPrintManager.printReport(jasperPrint, false);
conn.close();Edited by: jaae251 on Jun 18, 2009 2:29 AMIf you offer a PDF to the end user, they usually know what to do with it. OTOH, if you wish to provide software to facilitate the local printing, you might launch an application on the client side that accesses the JNLP API's PrintService - that can be done in a sandboxed application.
A signed application might access the normal J2SE based print services. Though I heard that Sun had decided to make printing a 'prompt on first attempt' deal - even for sandboxed apps., from 1.5 plus (or was it 1.6 plus?).
It would be a serious security bug if a web site could print on the client printer, without trust or active involvement from the end user. -
Web Reports - directing output to local printer.
We are running Forms/Reports web enabled, and we are designing
reports, that must send the output directly to the customers
printers without first showing them in a browser.
Can anyone please tell me how to do this?
Regards
BennyThere is a utility from Oracle called Remote Report Printing
Utility. This is meant for sending Web Reports ( HTML,PDF)to a
local printer. Though I have this utility+doc I havent
successfully done it.
If u want I can send it u.
Hope this Helps -
Print a web-report to a local printer
Dear All
I have a form(10g) with a report object that its destination type is 'PRINTER'. This form is run from application server (Form services 10g).The report is now sent to printer that set on AppServer machine. But I want to have it on local printer.
How can I config my application in order to send the report (.rdf) to my locan priner that set on my PC?
Thanks in advance ...
ImanIf you don't want to use the PJC you have other solutions.
In some cases you can add your local printer on the application server, this is done when your application is running on an intranet. You can also use the orarrp utility provided by Oracle.
Regards,
Tony -
NOT Able to print the Report output in the Printer
Hello guys
I have a concurrent Program-which is a report.A printer is installed in Oracle apps and i have assigned that printer to the concurrent Program.Now the problem is when i run the report after giving number of copies as 1 in options button,the report is getting completed sucessfully but it is not getting printed in the printer.
please help me in this issue.
log message:
Printing output file.
Request ID : 56734501
Number of copies : 1
Printer : xx-printer
Finished executing request completion options.
thanksPl post your OS and EBS versions and pl confirm that you can print the file to the printer from the OS level using OS commands.
MOS Doc 297522.1 - How to investigate printing issues and work towards its resolution ?
HTH
Srini -
Printing report output in PDF format
Hi,
I want to know what are the settings needed to print a report output in PDF format, while executing the report from Oracle applications (Ver 11.5.6).
Report is executed as a concurrent request from Oracle applications.
Normally when we run the report from Oracle applications, output will be opened in a internet browser(IE) in HTML format. But I want the output to be opened in PDF format instead of HTML.
OS: Sun Solaris 2.8.
Thanks & Regards,
SarishHi Sarish
Please contact Oracle Support for an answer or to customise your application so that it prints a report output in PDF Format.
To get PDF output you must run report/job with DESFORMAT=PDF in the command line instead of DESFORMAT=HTML/HTMLCSS.
Regards
Sripathy -
Print report output Automatically.
Hi friends
I am using GET_PRINT_PARAMETERS to create an spool request to print the report output automatically once it is displayed on screen, the problem with this FM if I assigned import parameter immediately = 'X' it does not create any spool request.
Is there any other way to automate the printing instead of pushing Pritn Icon on Application toolbar.
Thanks
LakhbirHi,
do this way...
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
<b>IMMEDIATELY = 'X'</b> LINE_SIZE = 220
<b>RELEASE = 'X'</b> MODE = 'CURRENT'
<b> NO_DIALOG = 'X'</b> IMPORTING
* OUT_ARCHIVE_PARAMETERS =
OUT_PARAMETERS = L_PARAMS
VALID = L_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
NEW-PAGE PRINT ON PARAMETERS L_PARAMS <b>NO DIALOG</b>.
"you can start your write statements here...
PERFORM DISPLAY_DATA.
NEW-PAGE PRINT OFF.
This will automatically prints the report
Regards
vijay -
Very urgent !!!!! printing on network printer using pl/sql
How can i automatically print the output on printer using pl/sql (procedures)
Hi,
Can you give some more details about your Network and hardware environment. Also give some more details about what Oracle products you are using.
Regards.
Yogesh D. -
Converting simple report output to PDF print layout issue
Hi all,
I am converted one report output to PDF format, it is working fine in one DEV sever, but when we moved it to other server the layout of output preview & font size is not coming properly (as same in DEV server) in the new server. I am using the below code, please check & correct me if anything is wrong.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
copies = '1'
cover_page = space
destination = 'LOCL'
expiration = '1'
immediately = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
line_size = 200
line_count = 65
* layout = 'Z_65_230'
layout = 'X_58_170'
sap_cover_page = 'X'
IMPORTING
out_parameters = mstr_print_parms
valid = mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
**--Creating Spool Request.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_count
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
**--Submitting the Report & Get the Output.
SUBMIT zpsr_submit_prcng WITH SELECTION-TABLE t_ebeln TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS mstr_print_parms
USER sy-uname " User for runtime authorizations
VIA JOB lv_job_name
NUMBER lv_job_count
AND RETURN.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_count
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Thanks & Regards
Avish
Moderator Message: Please use code tags when pasting code snippets. Also paste relevant portions of the code
Edited by: Suhas Saha on Jul 13, 2011 3:05 PMDear Alexander,
Thanks for the reply.
In this I am using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'. I have checked the settings from SPAD that is also same in both servers for particular output device. But the patches are diffrennt in both the servers, the server from which layout is not coming properly having the high level patches in compare to the other server(which is working fine). -
Print Reports on Client Default Printer
Hi All,
I am using Oracle Reports 11g Release 2 (11.1.2.2.0).
I want to print oracle reports from ADF which is JEE base framework on client default printer. I am send just plane url to generate report to report server. In Oracle forms we have option to get job id of report, but in plain url i am not seeing any thing like that. In forms in am generating PDF wait untill job is finished and then send pdf to client printer by using job id.
How it will be possible by using plain URL send to report server or any other idea to achieve this task.
Thanks in advance.If you offer a PDF to the end user, they usually know what to do with it. OTOH, if you wish to provide software to facilitate the local printing, you might launch an application on the client side that accesses the JNLP API's PrintService - that can be done in a sandboxed application.
A signed application might access the normal J2SE based print services. Though I heard that Sun had decided to make printing a 'prompt on first attempt' deal - even for sandboxed apps., from 1.5 plus (or was it 1.6 plus?).
It would be a serious security bug if a web site could print on the client printer, without trust or active involvement from the end user. -
Very very urgent Discoverer reports for non oracle applications
Hi,
My client is using discoverer 10g with R12.He is using different non oracle applications like BRM Application (database is oracle only) for that they wants to develop discoverer reports.It is possible to integrate with non oracle applications with discoverer.
Can you please suggest me.It is very very urgent.
Thanks & Regards.Hi
You're really not supposed to manage a non-Apps mode EUL and an Apps mode data within the same URL. Having said that, I have a hunch you just might be able to do it and there are 2 ways. You can either make the data available to user who login using E-Business Suite credentials or you can make it available to users who have database credentials. The first one is straightforward and you do it just like any other data. Let me give you some hints regarding the second method.
First of all I ahve not personally tried this and you may find that because Discoverer was initially set up in Apps mode that somewhere down the line it will make the suers connect this way. However, the following is worth a try.
I would a new schema in the Oracle E-Business database to manage the link to BRM and create a database link from this user to a user in the BRM database. You will also need to create user accounts within the database for anyone who needs to login and run BRM reports.
Next, I would create views in this new schema pointing at data across the BRM link, thus allowing Discoverer to think these are local objects.
In Discoverer Administrator, you would need to log in to Discoverer using the owner of the EUL - NOT using SYSADMIN or any of the other E-Business Suite accounts. You should log in with the Oracle Applications checkbox unchecked. You can now create new business areas on the BRM data. You should also be able to assign users to Discoverer privileges and users to business areas.
Using the same URL you would have Apps users connect using the E-Business Suite item on the drop-down for logging in and you would have BPM users choose the Business Intelligence Discoverer item.
Let me know how you get on
Michael
Maybe you are looking for
-
How can I run a application on a machine without JDK installed?
Hi all, I'm new to java,I want to know if there's a way to run a application on a machine without JDK installed, I noticed that some server application such as Domino have CORBA applications running in background,how can I set up such environment wit
-
I know I could create an "is not" for each synced Exchange account folder, but is there an easier way to perform a search for email messages that won't include results from currently synced network folders for a given account, but will include result
-
I am creating a data model from a database that is in 3rd Normal Form. My understanding in the physical layer I should make the joins based on the relation between tables. I have a CUSTOMER & ADDRESS table and I understand that my join will be 1:M he
-
I want to access remote EJB from my Portal Service. the EJB and the portal Service run on a separated machines. here is what i wrote: Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.j
-
Integration of external applications with E- Recruitment Business Package
Hello All, We are planning for an implementation on E-Recruitment Business Package on EP. We need to know whether it is possible in addition to E- Recruitment features provided we would be able to Integrate custom created/ external applications like