Home Discussions Questions & Answers Programmatic Export of Report XML to Database Filesystem

Programmatic Export of Report XML to Database Filesystem

Avatar photoCustomer July 26, 2023 at 6:56 am

I need to automate report migration. How can I use the Blitz Report API to export report definitions as XML (CLOB) and then write that file onto the application server’s filesystem?

Viewing 4 reply threads
  • Author
    Replies
    • Support July 28, 2023 at 7:12 am  

      You can use the function `XXEN_API.export_file_data` or `XXEN_API.export_report_` to retrieve the report XML data as a CLOB.

    • Avatar photoCustomer July 28, 2023 at 9:26 pm  

      And how is the CLOB physically written to the file system?

    • Support July 29, 2023 at 4:48 am  

      To write the CLOB to the database filesystem, you use the Oracle procedure `dbms_xslprocessor.clob2file`. This procedure requires pointing to a directory name defined in `dba_directories` (such as ‘OUT_FILE_LOC’) and specifying the desired filename.

    • Avatar photoCustomer July 30, 2023 at 7:08 am  

      Does the API support exporting multiple reports into one file?

    • Support July 30, 2023 at 6:34 pm  

      Yes, `XXEN_API.export_file_data` accepts a list of IDs (`p_ids` of type `fnd_table_of_number`) and exports them all into one single XML file for batch processing.

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

Login with: