SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 81 | Next

John Ward

"Practical Data Analysis and Reporting with BIRT"

The one limitation with this adapter is that there is no way
to explicitly use a particular type of delimiter. You are stuck with commas, pipes,
tabs, and spaces. This should cover most types of flat files you will come across.
In the following exercise, we will cover creating a connection to a flat text file that
contains employee pay information. The format of the text file is fairly simple. The file
will be a Comma-Separated text file, with the fields displayed in the following format:
First Name | Last Name | Payment Date | Payment Amount
Chapter 5
[ 75 ]
An example of the file is as follows:
John,Ward,1/2/2007,500
John,Ward,1/3/2007,600
John,Ward,1/4/2007,900
John,Ward,1/5/2007,400
Bunson,Honeydew,1/1/2007,300
Bunson,Honeydew,1/2/2007,300
Bunson,Honeydew,1/3/2007,200
Bunson,Honeydew,1/4/2007,100
Bert,Unibrow,1/1/2007,230
Ernie,,1/1/2007,275
Here, we can see that there is no header row to tell us what the column names are; so
it will be up to us to name those in our Data Set later on. Save the above information as
paymentInfo.csv. Now, to create a Data Source based on this file, follow these steps:
1. Create or open the report EmployeeReportCH5.rptDesign. Select the Flat
File Data Source and name the Data Source as dsFlatFilePayments.
2. Select the folder where the text files will reside.


Pages:
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93