Home Discussions Questions & Answers Exporting Multiple Reports to Separate XML Files

Exporting Multiple Reports to Separate XML Files

Avatar photoCustomer July 1, 2023 at 6:11 pm

We need to integrate our reports with a change management system, meaning each report requires its own XML definition file. How can I loop through a set of reports and programmatically export each one individually?

Viewing 4 reply threads
  • Author
    Replies
    • Support July 3, 2023 at 3:06 pm  

      Instead of `XXEN_API.export_file_data`, which bundles exports, you should use the function **`XXEN_API.export_report_`** inside a PLSQL loop.

    • Avatar photoCustomer July 5, 2023 at 12:49 am  

      What procedure handles the naming and writing of each individual XML file?

    • Support July 6, 2023 at 8:57 pm  

      The writing is still handled by `dbms_xslprocessor.clob2file`. Within the loop, you retrieve the report name and ID, call `export_report_` for the XML CLOB, and then use `dbms_xslprocessor.clob2file` to write it to the file system using a filename derived from the report name.

    • Avatar photoCustomer July 7, 2023 at 2:26 pm  

      How do I ensure spaces in the report name don’t break the filename?

    • Support July 9, 2023 at 3:20 am  

      A similar script example uses `xxen_report.space_to_underscore(c.report_name)` to sanitize the report name for use as a valid filename.

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

Login with: