This will
simplify this example. The XML file is saved as EmployeeData.XML. In order to use
this, I need to set up a Data Source. I will take the following steps to do so:
1. Create a new Report Project called BIRT Book Chapter 5.
2. Create a new report called EmployeeReportCH5.rptDesign. Use the Blank
Report template.
Chapter 5
[ 73 ]
3. Under the Data Explorer pane, right-click on Data Sources and select New
Data Source. Under the Data Source Type, select DTP XML Data Source. As
the Data Source Name, put in dsXMLEmployee.
Working with Data
[ 74 ]
4. Under the location Dialog, select the location where the XML file resides. If
available, select a DTD file to verify the schema of the XML file. In my case,
my XML file resides under the same workspace location as the Classic Cars
examples. Once selected, you can test the file by clicking on Test Connection,
or just click on Finish.
Now we have a Data Source containing Employee information. We will work with
this a little more when we get to work with Data Sets. For now, we can hold on to
this Data Source for use in a later example.
The next type of Data Source we will look at is the flat file data adapter. The flat
file data adapter is pretty much exactly like you would expect. It is an adapter that
provides connections to flat data files, such as Comma-Separated text files and other
delimited text file types.
Pages:
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92