Oracle Reports Building Reports 10g (9.0.4) Part Number B10602-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 multidimensional database to compare trends and performance.
Oracle 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 Oracle 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.
http://otn.oracle.com/products/reports/
).
textpds.zip
into a temporary directory on your machine (e.g., d:\temp
).
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.
Oracle_Home
/reports/conf
directory.
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:
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.
textpds.conf
file, launch Reports Builder.
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.
In the Report Wizard, the data source definition displays in the Data Source definition field.
Congratulations! You have successfully used a text pluggable data source for a paper report. You now know how to:
textpds.conf
file.
For more information on any of the wizards, views, or properties used in this example, refer to the Reports Builder Online Help, which you can access in two ways:
http://otn.oracle.com/products/reports/
), click Documentation and navigate to the Reports Builder Online Help for the most recent, hosted online help.
|
Copyright © 2002, 2003 Oracle Corporation. All Rights Reserved. |
|