Skip to content

How can a report be generated and archived programmatically (getting back a Result Key and print job ID for later use), without going through the PDF_REPORT_CREATED event-action path?

Answer

The underlying mechanism is a combination of two APIs: Archive_API.New_Instance creates a new archive entry from the report and parameter attributes you assemble, returning a Result Key that identifies it, and Print_Job_API.New_Print_Job followed by Print_Job_API.Print then generates the actual PDF tied to that Result Key (leaving the print-destination attribute empty avoids triggering an actual physical print) and returns a print job ID. Together, these give you both identifiers needed to manipulate the resulting archived report entry programmatically from a custom event action, instead of relying on the PDF_REPORT_CREATED trigger path.

← Browse Developer Studio, deployment, and upgrades questions