Feeding the report data from an XML file

Report data can come from an XML file.

To feed the report data from an XML file, use the runFromXML method. You can use this method for objects created from the DataConsumer, FourRpLayouter, FourRpProcessor or RemoteConnection class.

To use any of these classes, you must import the com.fourjs.report.runtime package:
import com.fourjs.report.runtime.*;
Once you create an instance of a report object, you can feed the report data using the runFromXML method:
//Create the report object
FourRpLayouter report = new FourRpLayouter(designFile, renderer);

//Run report from XML file:

Format of the incoming XML file

The XML file should be organized with Report, Group and OnEveryRow elements. For example: