Rethinking the Datacenter Sponsored by HP
Today's datacenters need to increase utilization, get control over power and cooling costs, and align with business objectives. Download this eBook to learn about the challenges facing the data center in a world where digital information is growing at a torrid pace and costs are being held in check. Learn more. »
Putting the Green into IT Sponsored by HP
Electricity use in data centers is skyrocketing, sending energy bills through the roof, creating environmental concerns and generating negative publicity. "Going Green" means looking to technologies like virtualization, energy-efficient chips and racks, and implementing policies that extend beyond the data center. Learn more. »
Managing the Modern Network Sponsored by HP
In a global economy where information crosses the globe in an instant, and where Web-based applications power business, it's more important than ever to ensure your network is safe from threats and optimized to deliver the data your business needs. »
Evaluating Software as a Service for Your Business
Sponsored by Webroot
Is Software as a Service just hype, or is something really going on here? See if your company can benefit as SaaS tries to change the face of the enterprise.
»
Is Your Disaster Recovery Plan Good Enough? Sponsored by HP
Preparing for a disaster is more often than not part of the storage planning process, and it is one of the most difficult tasks, since it includes local hardware and software, networking equipment, and a test plan. Learn how to get disaster recovery right. »
BIRT Report Engine provides report rendering extensions that render a report in HTML, PDF, XLS, PostScript, and Microsoft Word and PowerPoint. In BIRT release 2.2.1, the BIRT report rendering extension API supports rendering a report in a customized format, such as XML.
This article describes a sample implementation of customized XML report rendering extension, org.eclipse.birt.report.engine.emitter.xml. The sample code creates a plug-in that writes the data contents of a report to a file in the specified format.
A rendering extension adds an emitter to the BIRT Report Engine framework by implementing the extension point, org.eclipse.birt.report.engine.emitters. The XML schema file, org.eclipse.birt.report.engine/schema/emitters.exsd, describes this extension point.
The extension point enables support for a new output format in the presentation engine. The BIRT plug-in registry uses this extension point to discover all supported output formats specified for the report engine environment.
The sample XML report rendering extension is a plug-in that can export BIRT report data in XML format. Typically, report developers render BIRT report data to XML to enable sharing data with another application.
The sample XML report rendering extension contains the following features:
Exports BIRT report data in XML format
The XML report rendering plug-in renders each report element and writes to the output file, <report_name>.xml.
Defines a public API for rendering BIRT reports in XML format
The plug-in extends the functionality defined by the org.eclipse.birt.report.engine.emitter extension point defined in the org.eclipse.birt.report.engine plug-in.
Allows the user to specify an XML schema for formatting output
During the rendering process, the sample plug-in processes all the elements in the report design, exporting XML properties and related data to the output file. Optionally, the plug-in supports mapping the report elements to an XML schema to provide additional formatting for output.
The plug-in defines these mappings in the property file, <report_name>.xmlemitter. The plug-in reads the property file at run time and loads the custom tags.
Creating a XML Report Rendering Plug-In Project
Create a new plug-in project for the XML report rendering extension using the Eclipse PDE.
How to create the XML report rendering plug-in project
From the Eclipse PDE menu, choose File→New→Project.
On New Project, select Plug-in Project.
In Plug-in Project, modify the settings, as shown in Table 1.
Table 1: Values for Plug-in Project fields
Section
Option
Value
Plug-in Project
Project name
org.eclipse.birt.report.engine.emitter.xml
Use default location
Selected
Location
Not available when you select Use default location
Project Settings
Create a Java project
Selected
Source folder
src
Output folder
bin
Target Platform
Eclipse version
3.3
an OSGi framework
Not selected
In Plug-in Content, modify the settings, as shown in Table 2.
Table 2: Values for Plug-in Content fields
Section
Option
Value
Plug-in Properties
Plug-in ID
org.eclipse.birt.report .engine.emitter.xml
Plug-in Version
1.0.0
Plug-in Name
BIRT XML Emitter
Plug-in Provider
yourCompany.com or leave blank
Classpath
xmlEmitter.jar or leave blank
Plug-in Options
Generate an activator, a Java class that controls the plug-in's life cycle
Add www.developer.com to your favorites Add www.developer.com to your browser search box IE 7 | Firefox 2.0 | Firefox 1.5.xReceive news via our XML/RSS feed