Home Discussions Questions & Answers PLSQL API for Running Report and Returning BLOB Synchronously

PLSQL API for Running Report and Returning BLOB Synchronously

Avatar photoCustomer August 11, 2022 at 3:35 am

For synchronous, immediate report generation within a PLSQL script (not running as a concurrent request), how do I run the report and capture the output file content directly?

Viewing 4 reply threads
  • Author
    Replies
    • Support August 12, 2022 at 8:28 am  

      You use the procedure **`xxen_api.run_report`**. This procedure executes the report query synchronously and returns the Excel output file content in an `x_output_file` parameter of type BLOB.

    • Avatar photoCustomer August 13, 2022 at 9:25 pm  

      What initialization is needed before calling this procedure?

    • Support August 14, 2022 at 11:52 am  

      First, you must call `xxen_report.apps_initialize` to set the session context. Then, you call `xxen_api.create_run_id_` to get a `l_run_id`, set any necessary parameters, and finally call `xxen_api.run_report` using that `l_run_id`.

    • Avatar photoCustomer August 15, 2022 at 11:45 pm  

      Besides the BLOB, what other essential information does `run_report` return?

    • Support August 16, 2022 at 4:33 am  

      It also returns `x_row_count` (the number of rows extracted), `x_filename` (the suggested output filename), `x_return_status`, and `x_msg_data`.

Viewing 4 reply threads
  • You must be logged in to reply to this post.

Login with: