Output as XML (Swift)

Set up and configure output to XML from your reporting application.

Use the setProcessLevelDataFile() function to create XML files.

Example

// code snippet starts

let designFile: String = "SalesList.4rp"
let outputFilename: String = "SalesList.xml"

// Create the report engine.
let rcPtr = createRuntimeConfiguration(designFile)
configureDistributedProcessing(rcPtr, "127.0.0.1", 7000)
setProcessLevelDataFile(rcPtr, outputFilename)
let content_handler = createContentHandler(rcPtr)

// Run the report, creating the XML file.
let report = Sales(content_handler!, "Columbus Arts", 75038, Calendar.current.dateComponents([.year, .month, .day], from: Date()))

// code snippet ends

For further information about setProcessLevelDataFile() and other functions, refer to the Genero Report Writer C API documentation.