Output as XML (PHP)

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

Example

// code snippet starts

$dataFile = "./OrderReportData.xml";// name of XML file to be created
$designFile = "OrderReport.4rp";
$reportClassName="OrderReport\OrderReport";
// Configure the report engine to output the XML file by setting the GREDATAFILE environment variable
putenv("GREDATAFILE=$dataFile");
// Create the report engine 
$greRunnerObj = new FourjsReportRuntime($designFile, $reportClassName);
$greRunnerObj->configureDistributedProcessing("127.0.0.1",7000);
// Run the report, creating the XML file
$reportData = new OrderReport\OrderReport($connection);
$greRunnerObj->run($reportData->getMasterRecord());

// code snippet ends

For the full list of properties and methods, refer to the Genero Report Writer PHP API documentation.