Connecting to an XML datasource

XML is a popular data source used in many applications. JasperReports allows you to generate reports directly from XML data.

This recipe teaches you how to connect iReport to an XML file stored on your PC.

Getting ready

You need an XML file that contains report data. The EventsData.xml file is contained in the source code for this chapter. Unzip the source code file for this chapter and copy the Task2 folder from the unzipped source code to a location of your choice.

How to do it...

  1. Run iReport; it will open showing a Welcome Window, as shown in the following screenshot:
    How to do it...
  2. If you have not made any database connection so ...

Get JasperReports 3.6 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.