Oracle9i Reports Building Reports Release 9.0 Part Number A92101-01 |
|
Reports Builder enables you to use any data source you wish. In this chapter, you will learn how to use character-delimited text as a data source.
The information you must publish is often derived from data in various corporate data sources. These data sources may be SQL-based (relational databases) or non-SQL-based, such as XML, OLAP, and the like. Often, you must combine data from one or more of these data sources to publish meaningful information. For example, you may need to combine data that exists in a relational database with data from a multi-dimensional database to compare trends and performance.
Oracle9i Reports enables you to leverage capabilities, such as aggregation, summarization, formatting, and scheduling, on data from any data source. You can leverage the PDS (pluggable data source) architecture to connect to your own data source, as well as to the data sources available with Oracle9i Reports (XML, JDBC, text, and Express).
For more information on pluggable data sources, refer to the Reports Builder online help and the Javadoc documentation for the PDS APIs.
Suppose you downloaded the US Census Bureau data in CSV (comma-separated values) format and want to generate a report. In this example, you will create a paper report that queries this data.
Feature | Location |
---|---|
Configure Reports Builder to recognize your text file as a pluggable data source. |
|
Use the Report Wizard to create an paper report based on the text data source. |
To build the examples in this manual, you must have the example files we've provided. If you haven't already done so, you can download the files you'll need to complete this example from the Oracle Technology network (http://otn.oracle.com/products/reports/) and install them on your machine.
d:\orawin90\examples
).
This zip file contains the following files:
Before you can use a text file as your pluggable data source, you must set up the text PDS configuration file (textpds.conf) with the definition of the values in the text file. When you add this format information to the configuration file, Reports Builder can then recognize your entries as a valid format.
config.txt
file we've provided in the Examples/TextPDS/Scripts directory.
config.txt
and paste it into textpds.conf
before the </textPDS> entry, so that the resulting textpds.conf file contains an entry like this:
textpds.conf
file.
You have set up your textpds.conf file for the character-delimited text data source.
When you create a report, you can either use the Report Wizard to assist you or create the report yourself. To build the simple report in this example, you can use the Report Wizard.
Before you use a text pluggable data source, you might want to examine the text file first to see what it looks like. You can open the census_csv.conf file in a text editor, like UltraEdit or WordPad, to see the data we'll be using in this example.
If you get an error message and cannot display the Query Definition dialog box, check your configuration file (textpds.conf) to confirm the code you added.
census_csv.txt
file we provided in the Examples/TextPDS/Scripts directory.
If you do not see the file listed in your directory, make sure you've selected TXT from the drop-down list.
census_csv.txt
file displays in the Location field, click OK.
The data source definition displays in the text box.
The report displays in the Paper Design view, and should look something like this:
Congratulations! You have successfully used a text pluggable data source for a paper report. You now know how to:
For more information on using text as a data source, refer to Getting Started with Oracle9i Reports on the Oracle Technology Network (http://otn.oracle.com/products/reports/), or the Reports Builder online help, which you can access by choosing Help > Help Contents in Reports Builder.
|
![]() Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|