Chapter 4. Working with a Variety of Data Sources

In this chapter, you will learn:

  • Creating a report from relational data
  • Connecting to an XML datasource
  • Creating a report from XML data using XPath
  • Using multiple relational databases to generate a report
  • Creating a report from model beans of Java applications

Introduction

This chapter is all about data sources. Application data resides in a variety of sources such as relational databases, XML data sources, and Java objects (model beans or Plain Old Java Objects). iReport will need to access these data sources in order to generate a report.

iReport uses the concept of loose coupling between data sources and report design. Loose coupling means you can design your reports independent of the type of data source used. This means the same report design can work with any data source. You will experience the advantage of this loose coupling while executing the recipes of this chapter.

Relational databases are perhaps the most popular data sources used to hold application data. XML is another common data source, which is usually used to exchange data between applications.

I cover both of these in this chapter.

Another common data source is JavaBeans, which holds data at runtime. You may also need to configure iReport to work with JavaBeans. So this chapter also covers JavaBeans as a data source.

..................Content has been hidden....................

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