Question

Invoke report rule action from RDF

  • 25 May 2021
  • 7 replies
  • 148 views

Badge +5

Hello,

Our customer wants to disable the report rules but their actions should be implemented in RDF file. I know how to invoke Archive Property through code but does anyone has any idea about invoking “Default Property” through code in RDF file?

Any help/idea is appreciated.

 

 

Thanks & Regards

Mohit.


This topic has been closed for comments

7 replies

Userlevel 7
Badge +16

Hi @flemohitj ,

 

I doubt whether this is practical after disabling the report rule. And cannot understand why they need to disable the report rule and implement the actions in RDF. When I check the below code it check the enabled report rule in the cursor before evaluating each action. Since these are framework code we cannot change the cursors.

 

If customer need to disable the report rule then they can try using PDF_REPORT_CREATED event to set printer_id, layout and etc

Badge +5

Thanks Dumeesha for your quick response. They want to implement the same logic in the RDF what we have in Report rules.

Is there anyway we can set the printer id in RDF file?

I was able to set the report layout using Archive_API.Set_Layout_Name but I couldn’t find any code/way to set the printer id in RDF based on certain conditions.

 

Thanks & Regards

Mohit

Userlevel 7
Badge +16

Hi @flemohitj ,

 

Check whether below window is help full for you to set the printer for the report. It is considered to the print dialog.

 

Userlevel 7
Badge +16

Hi @flemohitj ,

 

Check whether below window is help full for you to set the printer for the report. It is considered to the print dialog.

After setting the above property you can use below procedure to get the printer. I guess your requirement is to run the RDF in a different report printing flow. 

Printer_Connection_API.Get_Default_Printer(Fnd_Session_API.Get_Fnd_User, 
                                                                report_,
                                                                language_code_ => lang_code_);

Badge +5

Thanks Dumeesha. 

I had checked this screen but customer has several printers and they want to default each one of them based on certain conditions like site, invoice series etc.

I can default a printer for session user(based on required conditions) and once the report is printed, I will set it back to the original one but I was trying to find out a better solution because this solution can cause a problem if there is any error.

It seems defaulting a printer id on print dialog comes from Framework(client). I will tell customer that this doesn’t seem feasible.

 

I really appreciate your help!!

 

Thanks & Regards

Mohit

Badge +5

It seems, we can set a printer id through code in APPS10 but not in APPS9. Sorry, I forgot to mention that our customer is on APPS9 version.

APPS 10:

 

Thanks & Regards

Mohit.

Userlevel 4
Badge +5

Hi Mohit,

Would the logical printer concept be an alternative for this?

User can print to a logical printer and that printer could be accessed by a physical printer on your preference. You can set up a logical printer for Purchase_Order, then you’ll get all PO prints there and assign a physical printer as appropriate. 

For Eg: Once you setup preferences like site, invoice series etc from your code then you’ll print it to a certain Logical Printer named like SITE1_SERIES1 etc, which will eventually forwarded to a physical printer you prefer.

Best Regards,

Asanka Francis.