Developing an Application Using the Eclipse BIRT Report Engine API

The Eclipse platform is an open source, integrated system of application development tools that you implement and extend using a plug-in interface. The Eclipse Business Intelligence Reporting Tool (BIRT) is a set of plug-in extensions that enable a developer to add reporting functionality to an application. BIRT provides a Report Engine API that a developer can use to create a customized report generator application. The org.eclipse.birt.report.engine.api package contains a set of interfaces and implementation classes that supports integrating the runtime part of BIRT into an application.

The BIRT Report Engine can provide report generation and rendering services in the following environments:

Stand-alone engine: A Java developer uses a stand-alone engine to render a BIRT report from a report design (.rptdesign) file. In this environment, the Java developer creates a command-line application that writes a report to disk, either in HTML or PDF format.

Web application: A Web application similar to the BIRT report viewer uses an embedded BIRT report engine to generate a Web-based report.

This article describes how to develop a customized report generation application that performs the following tasks:

Creates and configures a report engine

Opens a report design or report document

Accesses data from a data source

Generates a report in a supported output format

Shuts down the engine

Creating and Configuring a Report Engine
The main interfaces and classes in the org.eclipse.birt.report.engine.api package are:

ReportEngine

EngineConfig

IReportRunnable

IRenderOption and its descendants

IEngineTask and its descendants

A report engine is an instantiation of the ReportEngine class. This object is the key component in any reporting application. It provides access to runnable report designs, parameters, the structure of a report design, and the task for generating a report from a report design. You can use the ReportEngine object to perform the following tasks:

Get a configuration object.

Open a report design or a report document.

Create an engine task to get parameter definitions and set parameter values.

Create an engine task to access data from a data set.

Get supported report formats and MIME types.

Create an engine task to run a report or render a report to an output format.

Create an engine task to extract data from a report document.

Clean up and shut down the engine.

A single report engine object can generate multiple reports from multiple report designs. Each application, whether it's stand-alone or Web-based, only needs to create one ReportEngine instance. The BIRT report engine is thread-safe, so this single-instance recommendation is not a restriction. At termination, the application should call shutdown( ) to unload extensions and delete temporary files.

The EngineConfig class contains the configuration settings for the report engine. Use the EngineConfig object to specify the settings for the following properties:

HTML emitter configuration for custom handling of images or actions for HTML output

Logging to set the logging file location and level

Platform context to indicate whether the application and engine home are in a stand-alone environment or packaged as a WAR file

Resource files to set the location where the reporting application can access libraries and properties files

The engine home is the key property that the report engine requires. The report engine cannot parse the report design or run the report without a defined engine home. For a stand-alone application, the engine home is an absolute path to a file system location. For an application running from a WAR file on an application server, the engine home is a relative path in the WAR file.

Two engine configuration properties depend on whether the environment in which the application runs is stand-alone or in a WAR file on an application server. These properties are the platform context and the HTML emitter configuration. The platform context provides the report engine with the mechanism to access files. The HTML emitter configuration provides the functionality for processing images and handling hyperlinking and bookmark actions.

A ReportEngine constructor takes the EngineConfig object as its argument. If the configuration object is null, the report engine uses the default configuration. If the configuration object is null, the environment must provide a BIRT_HOME variable that specifies the directory containing the engine plug-ins and JAR files.

Listing 1 shows how to set up a report engine in a stand-alone application. The application uses the engine home located in the BIRT runtime directory. The report output format is HTML. The application configures the HTML emitter and creates the report engine using the settings contained in the EngineConfig object.

Opening a Report Design or Report Document
BIRT Report Engine can generate a report from either a report design or an existing report document. To open a report design, call one of the openReportDesign( ) methods on ReportEngine. These methods instantiate an IReportRunnable object using a String object that specifies the path to a report design or an input stream.

To open a report document, call the ReportEngine.openReportDocument( ) method. This method instantiates an IReportDocument object using a String object that specifies the path to a report document (.rptdocument) file. This method returns the IReportDocument object. You must handle the EngineException that these methods throw.

The IReportRunnable object provides direct access to basic properties of the report design. The names of report design properties are static String fields, such as IReportRunnable.AUTHOR. To access a report design property, use the getProperty( ) method with a string argument that contains one of these fields.

To access and set the values of parameters, use methods on a parameter definition task object, described later in this article. Listing 2 shows how to open a report design and find a property value. If the engine cannot open the specified report design, the code shuts down the engine. The variable, engine, is a ReportEngine object.

The IReportDocument object provides access to the data in a report and the report's structure. IReportDocument provides methods to retrieve table of content entries, bookmarks, and page information.

To access table of content entries, use the findTOC( ) method. This method takes a TOCNode argument and returns a TOCNode object. To find the root table of contents entry, use a null argument. To find the subentries of a table of contents entry, use the getChildren( ) method. This method returns a list of TOCNode objects. From a TOCNode object, you can retrieve the display value of the entry and a Bookmark object.

Jason Weathersby is a member of the extended BIRT development team at Actuate Corporation and has backgrounds in both computer science and technical writing. He has many years experience in technical consulting, training, writing, and publishing about reporting, business intelligence tools, and database technologies.

Tom Bondur is a member of the extended BIRT development team at Actuate Corporation and has backgrounds in both computer science and technical writing. He has many years experience in technical consulting, training, writing, and publishing about reporting, business intelligence tools, and database technologies.

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

For IoT to grow as quickly as analyst firms’ project, a lot is going to fall on developers to quickly bring applications to market. But the lack of a standard development platform threatens to slow growth and make application development more time consuming and costly, much like we’ve seen in the mobile space.
In his session at @ThingsExpo, Mike Weiner, Product Manager of the Omega DevCloud with KORE Telematics Inc., discussed the evolving requirements for developers as IoT matures and conducted a live demonstration of how quickly application development can happen when the need to comply wit...

SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA.
For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.

The Internet of Everything (IoE) brings together people, process, data and things to make networked connections more relevant and valuable than ever before – transforming information into knowledge and knowledge into wisdom. IoE creates new capabilities, richer experiences, and unprecedented opportunities to improve business and government operations, decision making and mission support capabilities.

Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy.
How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your archit...

MuleSoft has announced the findings of its 2015 Connectivity Benchmark Report on the adoption and business impact of APIs.
The findings suggest traditional businesses are quickly evolving into "composable enterprises" built out of hundreds of connected software services, applications and devices. Most are embracing the Internet of Things (IoT) and microservices technologies like Docker. A majority are integrating wearables, like smart watches, and more than half plan to generate revenue with APIs within the next year.

Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world.
Get ready to learn the facts:
Is there a bias against women in the tech / developer communities?
Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions?
Some beginnings of what to do about it!
In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...

In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.

The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional?
In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.

Discussions about cloud computing are evolving into discussions about enterprise IT in general. As enterprises increasingly migrate toward their own unique clouds, new issues such as the use of containers and microservices emerge to keep things interesting.
In this Power Panel at 16th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the state of cloud computing today, and what enterprise IT professionals need to know about how the latest topics and trends affect their organization.

It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed.
In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.

Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years.
In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.

There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.

Akana has released Envision, an enhanced API analytics platform that helps enterprises mine critical insights across their digital eco-systems, understand their customers and partners and offer value-added personalized services.
“In today’s digital economy, data-driven insights are proving to be a key differentiator for businesses. Understanding the data that is being tunneled through their APIs and how it can be used to optimize their business and operations is of paramount importance,” said Alistair Farquharson, CTO of Akana.

Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.

The enterprise market will drive IoT device adoption over the next five years.
In his session at @ThingsExpo, John Greenough, an analyst at BI Intelligence, division of Business Insider, analyzed how companies will adopt IoT products and the associated cost of adopting those products.
John Greenough is the lead analyst covering the Internet of Things for BI Intelligence- Business Insider’s paid research service. Numerous IoT companies have cited his analysis of the IoT. Prior to joining BI Intelligence, he worked analyzing bank technology for Corporate Insight and The Clearing House Payment...

"Optimal Design is a technology integration and product development firm that specializes in connecting devices to the cloud," stated Joe Wascow, Co-Founder & CMO of Optimal Design, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.

SYS-CON Events announced today that CommVault has been named “Bronze Sponsor” of SYS-CON's 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. A singular vision – a belief in a better way to address current and future data management needs – guides CommVault in the development of Singular Information Management® solutions for high-performance data protection, universal availability and simplified management of data on complex storage networks. CommVault's exclusive single-platform architecture gives companies unp...

Electric Cloud and Arynga have announced a product integration partnership that will bring Continuous Delivery solutions to the automotive Internet-of-Things (IoT) market. The joint solution will help automotive manufacturers, OEMs and system integrators adopt DevOps automation and Continuous Delivery practices that reduce software build and release cycle times within the complex and specific parameters of embedded and IoT software systems.

"ciqada is a combined platform of hardware modules and server products that lets people take their existing devices or new devices and lets them be accessible over the Internet for their users," noted Geoff Engelstein of ciqada, a division of Mars International, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.

Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.

JavaScript is primarily a client-based dynamic scripting language most commonly used within web browsers as client-side scripts to interact with the user, browser, and communicate asynchronously to servers.
If you have been part of any web-based development, odds are you have worked with JavaScript in one form or another. In this article, I'll focus on the aspects of JavaScript that are relevant within the Node.js environment.

Technology changes at the speed of light. To say it can be hard to keep up is an understatement. For performance engineers, taking charge of your own continuing education is one of the most important things you can do to remain at the top of your game.

Most developers learn best by examples, which naturally tend to simplify matters and omit things that aren’t essential for understanding. This means that the “Hello World” example, when used as starting point for an application, may be not suitable for production scenarios at all.
I started using Node.js like that and I have to confess that it took me almost two years to quantify the huge performance impact of omitting a single environment variable. In fact it was just a coincidence that I even...

It is interesting to me, how quickly the hype cycle of a good thing can turn it into a monster that will inevitably eat itself, leaving a much smaller – and much more useful – concept or toolset behind. It has happened over and over in high tech, one need only say “XML” to understand what I mean. It is definitely a useful tool for some jobs, but the “XML Everywhere” craze was insane. People declaring such patently false ideas as “It will end the need for programmers.”

As companies embrace the DevOps movement, they rely heavily on automation to improve the time to market for new features and services. DevOps is a long, never-ending journey with a goal of continuously improving the software delivery process, resulting in better products and services and, ultimately, happier customers. At the beginning of their DevOps journeys, many companies focus on continuous integration (CI), in which they automate the build process. Automated testing is implemented so that ...

It's been three years since I compared medieval security to web security, and a few things have happened. Mobile and wireless have evolved as the dominant platforms, while the life between personal computing and business computing has continued to fray. And, of course, thanks to web services, the web-delivered API now dominates the connected world.
It's time to take a second look, focusing on the API. That is, if our organization is a castle, then the API is the unique services that people ca...

In their session at DevOps Summit, Asaf Yigal, co-founder and the VP of Product at Logz.io, and Tomer Levy, co-founder and CEO of Logz.io, will explore the entire process that they have undergone – through research, benchmarking, implementation, optimization, and customer success – in developing a processing engine that can handle petabytes of data.
They will also discuss the requirements of such an engine in terms of scalability, resilience, security, and availability along with how the archi...

"To us DevOps is actually a movement that at the very center is about developers and IT operations teams collaborating in a framework that drives agility, drives the ideation to production readiness in a seamless manner," explained Monish Sharma, Director in PwC's consulting business, in this SYS-CON.tv interview at @DevOpsSummit, held June 9-11, 2015, at the Javits Center in New York City.

Beginning with Ruxit Agent v1.73, Ruxit provides root cause analysis for Node.js errors down to the code level. As with other services, Ruxit marks web requests to Node.js as failed based on the accompanying HTTP error code.
Simply click the Failure rate portion of any Node.js service infographic to view the Failure analysis chart. If you have failures, click the View details of failures button to see which requests failed along with an overview of failure reasons sorted by HTTP code. You can s...

One of the ways to increase scalability of services – and applications – is to go “stateless.” The reasons for this are many, but in general by eliminating the mapping between a single client and a single app or service instance you eliminate the need for resources to manage state in the app (overhead) and improve the distributability (I can make up words if I want) of requests across a pool of instances. The latter occurs because sessions don’t need to hang out and consume resources that could ...

SYS-CON Events announced today that Logz.io has been named a “Bronze Sponsor” of SYS-CON's @DevOpsSummit Silicon Valley, which will take place November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA.
Logz.io provides open-source software ELK turned into a log analytics platform that is simple, infinitely-scalable, highly-available, and secure.
For more information, visit http://logz.io/.

Approved this February by the Internet Engineering Task Force (IETF), HTTP/2 is the first major update to HTTP since 1999, when HTTP/1.1 was standardized. Designed with performance in mind, one of the biggest goals of HTTP/2 implementation is to decrease latency while maintaining a high-level compatibility with HTTP/1.1. Though not all testing activities will be impacted by the new protocol, it's important for testers to be aware of any changes moving forward.

Much has already been written about the virtues of Docker, and containers in general like CoreOS or Kubernetes. How life-changing Docker is, how innovative, etc. However, the real secret to Docker's success in the marketplace is the hidden retribution of innovation. Innovation and R&D is the lifeblood of today's technology success. Companies, no matter how large, must iterate constantly to stay ahead of their legacy competitors and new upstarts risking disruption. The rise of Agile methodologies...

Brand owners are caught in a digital crossfire.
From one direction comes intense competitive pressure to innovate or to at least follow very, very quickly. From the precisely opposite direction comes the potentially existential threat of an app very publicly flopping or – even worse – being very publicly revealed to jeopardize the customer’s well-being.
Either way, you lose brand value in a social marketplace where brand is your primary currency.
What’s a brand owner to do?

A website visit may involve a wide range of components many of which are off-site or not easily monitored. So what do you have in your toolbox to help address this? Load testing, real-user monitoring and site instrumentation all help you prepare for and monitor your website visitors’ experiences. But one more tool that’s essential for a performance engineer is synthetic user monitoring. It’s a critical part of a web monitoring strategy, however for many people, it’s uncharted territory. So, in t...

Stage setting: Camera is positioned above the treetop of one of three tall poplars. It looks down on the terrace of a pub. It’s evening, but there’s still enough light to see that the terrace is sparsely populated.
Camera slowly moves down towards a specific table in the corner…
As the camera moves down, an old, crummy typewriter font appears on the screen, typing with distinct sound. It spells:

This week, I joined SOASTA as Senior Vice President of Performance Analytics. Given my background in cloud computing and distributed systems operations — you may have read my blogs on CNET or GigaOm — this may surprise you, but I want to explain why this is the perfect time to take on this opportunity with this team. In fact, that’s probably the best way to break this down. To explain why I’d leave the world of infrastructure and code for the world of data and analytics, let’s explore the timing...

Unbeknownst to some, organizations have run infrastructure containers in production for years, reaping benefits on the operational end but not yet providing value for developers. When Docker catapulted containers into mainstream adoption, another type of container emerged — one that’s enormously popular for developers, but not quite ready for Ops. It’s time to close the gap between the promise that Devs see in containers and the operational challenges of actually running them in production.
In...

You often hear the two titles of "DevOps" and "Immutable Infrastructure" used independently.
In his session at DevOps Summit, John Willis, Technical Evangelist for Docker, covered the union between the two topics and why this is important. He provided an overview of Immutable Infrastructure then showed how an Immutable Continuous Delivery pipeline can be applied as a best practice for "DevOps." He ended the session with some interesting case study examples.

Business and IT leaders today need better application delivery capabilities to support critical new innovation. But how often do you hear objections to improving application delivery like, "I can harden it against attack, but not on this timeline"; "I can make it better, but it will cost more"; "I can deliver faster, but not with these specs"; or "I can stay strong on cost control, but quality will suffer"? In the new application economy, these tradeoffs are no longer acceptable. Customers will ...

Cloud computing budgets worldwide are reaching into the hundreds of billions of dollars, and no organization can survive long without some sort of cloud migration strategy. Each month brings new announcements, use cases, and success stories.