Skip to content

Is there a way to generate and email a PDF copy of a report (like a Purchase Order) directly from a custom event's PL/SQL, without needing the report's existing default event/PDF parameters?

Answer

Yes — call Archive_API.New_Client_Report (passing the report ID, layout name, and parameter attributes) to create a new report archive instance and get back a result key, then use Print_Job_API.New with a print-job attribute string that includes printer/settings values enabling PDF generation and email delivery (a SEND_PDF=TRUE style setting alongside a recipient address), followed by Print_Job_Contents_API.New_Instance and Print_Job_API.Print to actually trigger it — this combination generates the PDF and emails it in one PL/SQL block, overriding or bypassing whatever default PDF/event parameters the report would otherwise use.

← Browse Developer Studio, deployment, and upgrades questions