Question

PDF report oto print(with trigger) in PLSQL side

  • 2 August 2023
  • 1 reply
  • 64 views

Userlevel 3
Badge +7

Hi Community,

 

I want to trigger PDF report print job from Oracle side. I try to write one procedure but it doesn’t work. Could you help me Please ?

 

Thank you

 

 


1 reply

Userlevel 4
Badge +8

Hello @savasciftci 

In general, please copy the code directly in order for anybody to easily read-through and give feedback.

However, I just skimmed through your screenshot, and clearly saw that you’ve not created a new Archive instance (Archive_API.New_Instance), which will surely fail the Print Job creation (Print_job_api.Print) because there’s no related Print job contents (Print_Job_Contents_API.New_Instance) created.

A successful report print should first create a new Print Job object, and an archive instance, and a job content in order to execute the print. 

I’d suggest you to follow the below flow to get the job done.

  1. Create the print job object (with printer ID via the report attr object) and get the print job ID
  2. Create the archive instance (with report ID, archive parameters, etc by feeding report attr and the parameter attr) which returns the new archive ID (result key)
  3. Then, create the print job content (feed the job ID [step 1] and result key [step-2] via attr) 
  4. Print (by providing the job ID)

This should get you the successful report print (with related archive and print manager records).

Hope this helps.

/Manulak

Reply