Hi,
I am working the purchase order screen and introduced a new command. When the user click this command a report should generate for the purchase order and automatically check-in that to document management. (Here print dialog is not opening)
How to achieve this in the server side?
Regards,
Tharindu
Hi Tharindu,
I think you can do this with the report rule engine. And someone discussed this, or something similar, here:
https://community.ifs.com/topic/show?tid=5723&fid=43
/Mathias
Hi Mathias,
It does the job with the Print Dialog screen. In my case the printing should happen without the print dialog.
How to trigger the same thing in that case ?
Regards,
Tharindu
I don’t know that, sorry.
As Mathias said you can use a Report Rule called’ Check in to Docman” to check in the generated PDF report to document management. It’s doesn’t matter if you print it through the Print Dialog or not. You need to print to a Logical Printer. If the print job is successfully completed then the rule is triggered and checked in to docman. There are lots of places in the IFS Application where printing is done directly without showing the Print Dialog.
In the “Inventory Part Barcodes Analysis” page select a row and select “Print Barcode Label” button at the top or from the menu. You will be asked to print without preview or not. If you select “Yes” to print without preview, it will directly put a print job. If you follow that you can find the code on how to do so, and with the Report Rule, you can checkin to docman.
Hi
Following thread has some good examples on how to create a print job and print.
Batch print Work Instructions for Shop Orders, IFS9 | IFS Community
Check-in the pdf to docman:
If the report rules does not work in favor, you can create an event action in PDF_REPORT_CREATED and do the coding.
Attached script is something I prepared for a similar requirement and it has the code you’ll need to create a docman object, check-in report pdf and create a doc reference in Inventory part. Hope it will be useful. It’s prepared for APPS10 but most probably will work in APPS9 without a complain. Not sure about cloud version.
Cheers!
Damith
Thank you
With all your help and this post I was able to achieve the result I expected. :)
Regards,
Tharindu
Thank you
With all your help and this post I was able to achieve the result I expected. :)
That’s great to hear! Would it be possible to share some of the details here? For example, if you used a report rule engine, can you share the rules? Others might be very interested in trying out the same thing.
Thanks!
Hi
Here you go
1. We use the report rule to attach the generated PDF to the Document Management
2 . Then We use the server method to print the report to a logical printer as it’ll trigger the reporting rule
PROCEDURE C_Silent_Print_Po (
order_no_ IN VARCHAR2)
IS
layout_name_ VARCHAR2(2000):= 'PurchaseOrderPrintRep.rdl';
report_id_ VARCHAR2(2000):= 'PURCHASE_ORDER_PRINT_REP';
report_attr_ VARCHAR2(2000):= '';
parameter_attr_ VARCHAR2(2000):= '';
instance_attr_ VARCHAR2(2000):= '';
print_attr_ VARCHAR2(2000):= '';
attr_ VARCHAR2(2000):= '';
distribution_list_ VARCHAR2(2000):= '';
print_job_id_ VARCHAR2(2000):= '';
printer_id_ VARCHAR2(2000):= 'No Printout,SERVER,NO_PRINTOUT';
result_key_ VARCHAR2(2000):= '';
BEGIN
Client_SYS.Clear_Attr(report_attr_);
Client_SYS.Add_To_Attr('REPORT_ID', report_id_, report_attr_);
Client_SYS.Add_To_Attr('LAYOUT_NAME', layout_name_, report_attr_);
Client_SYS.Clear_Attr(parameter_attr_);
Client_SYS.Add_To_Attr('ORDER_NO_LIST', order_no_, parameter_attr_);
Client_SYS.Clear_Attr(print_attr_);
Archive_API.New_Client_Report(result_key_, report_attr_, parameter_attr_, distribution_list_,
print_attr_);
Archive_API.Get_Info(instance_attr_,parameter_attr_,result_key_);
Client_SYS.Clear_Attr(attr_);
Client_SYS.Add_To_Attr('PRINTER_ID', printer_id_, attr_);
Print_Job_API.New(print_job_id_,attr_);
Client_SYS.Add_To_Attr('PRINT_JOB_ID', print_job_id_, instance_attr_);
client_SYS.Add_To_Attr('RESULT_KEY', result_key_, instance_attr_);
Print_Job_Contents_API.New_Instance(instance_attr_);
Print_Job_API.Print(print_job_id_);
END C_Silent_Print_Po;
Thanks! What is calling that server method? A custom event? A custom menu?
Hi
In my case I’m calling that method through a command in Aurena.
Hi
In my case I’m calling that method through a command in Aurena.
Thanks!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.