The developerWorks article on business intelligence I mentioned a while back has been published. It covers several use cases for integrating BIRT reports into a Zero PHP application. It uses the sample database and reports provided by BIRT and runs against a MySQL database.
From my perspective the most interesting example is the last one: scripted data sources. In this use case the report doesn't get its data from a database query. Instead the PHP script creates the data and pushes it into the BIRT runtime ready for the report to render. Here is the sample code:
$engine = startup();
$root_directory = zget("/config/root");
$report_engine = $root_directory."/ReportEngine";
$design_file = $root_directory.
$images_directory = $root_directory.
$design = $engine->openReportDesign($design_file);
$task = $engine->createRunAndRenderTask($design);
$models = array("ANG Resellers",
"1952 Alpine Renault 1300", "Red");
$models = array("AV Stores, Co.",
"1969 Harley Davidson Ultimate Chopper", "Blue");
$models = array("Alpha Cognac",
"1969 Ford Falcon", "Blue");
$models = array("Asian Shopping Network, Co",
"1969 Dodge Charger", "Plum Crazy Purple");
$models = array("Asian Treasures, Inc.",
"1969 Corvair Monza", "Red");
$options = new HTMLRenderOption();
The bold section hard codes some data for the report. A more realistic example might query an external system like a web service to build the data set.