Chapter 7. Report Projects and Libraries

Up until now, all the reports we have built have been very simple reports. However, we have seen that each of these reports use very similar components between them such as the data sources to the Classic Cars database and the datasets that pull employee information. These are common elements between the reports we have built. In most project-based development environments, there is a way to share common elements between components, and BIRT is no exception to this.

Also, in the previous chapters we worked with a single project. This chapter will help us create a more structured reporting project and work with libraries to share the common report elements between reports. In most report development shops that I have come across, this is a great way to structure report development and can save developers lots of time, especially when more complex report components get developed. By grouping reports in projects and reusing elements in libraries, common elements such as headers, data sources, and queries can be reused with a minimal amount of development effort.

Report projects

Earlier in the book, we created a report project that contains the examples we have built so far. But the concept of what a report project is and how to work with them is has not yet been thoroughly covered.

A report project in Eclipse is simply a high-level container that will be used to store all files in a given project. In Eclipse, projects are simply folders, either contained inside of a workspace or linked to an external file system folder or directory outside of the workspace. What differentiates projects from regular folders is a special file inside this folder that defines various properties for the project and which is usually named project name.project. For our general purpose report development, we don't really need to know anything else about this file; simply knowing that projects are just folders that contain all the files related to our project is enough.

Project types are defined when we first create our project. In earlier versions of BIRT, there was only a Report Project type. In newer versions of BIRT, there are many different types of projects that are BIRT related. We have been working on a Report Project throughout this book. For the remainder of the book, we will continue using the BIRT Report Project; just keep in mind that there are other report project types as well. There is also the BIRT ODA Designer Plug-in and the BIRT ODA Runtime Plug-in projects, for building our own custom BIRT Open Data drivers for the BIRT Designer and BIRT Runtimes respectively. The following screenshot shows the project types that come with BIRT 2.5:

Report projects
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset