Home » Developer & Programmer » Forms » Print Report output to local printer on button click in form
Print Report output to local printer on button click in form [message #232120] Thu, 19 April 2007 09:33 Go to next message
hitme2u
Messages: 3
Registered: April 2007
Location: Atlanta
Junior Member
Hi,


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.

I searched many forums but i found customizations on form level. I am trying to customize the form using custom.pll.
I found many examples like (http://www.orafaq.com/forum/m/208076/104372/?srch=Print+report+automatically#msg_208076) but i dont think i can use these practices in custom.pll. ADD_PARAMETER & RUN_PRODUCT dont work in custom.pll. This is very urgent requirement and i am suffering with this problem from 1 week.

I need to complete this requirement immediately. Can anyone suggest me better ways in doing this. Am i following the right track?. Plz guide me

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;



Thanks for taking time to read this



Thanks,

Srinivas
Re: Print Report output to local printer on button click in form [message #232267 is a reply to message #232120] Thu, 19 April 2007 23:52 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As this appears to be a work related query and I expect that you have Oracle support, I strongly recommend that you escalate this to Oracle via metalink.

David
Re: Print Report output to local printer on button click in form [message #529192 is a reply to message #232120] Sat, 29 October 2011 10:37 Go to previous message
praveendj09
Messages: 2
Registered: October 2011
Location: United Arab Emirates
Junior Member
hi where you able to get a solution for this ..

even i actually wanted to do the same .
Previous Topic: exec_sql restriction 11g2?
Next Topic: Printing from Custom.pll
Goto Forum:
  


Current Time: Sat Sep 07 12:56:40 CDT 2024