43 Building a Report with a Barcode

In this chapter, you will learn about reports that include a barcode. By following the steps in this chapter, you can generate the report output shown in Figure 43-1.

Figure 43-1 Barcode JavaBean Web report output

Description of Figure 43-1 follows
Description of ''Figure 43-1 Barcode JavaBean Web report output''

Concepts

  • By using a barcode JavaBean, you can build reports that display a barcode to make tasks like tracking shipping orders and employee identification numbers easier.

  • You can create a paper or Web report that uses JavaBeans. For a paper report, you must use the Java Importer to create a PL/SQL wrapper so that you can call the JavaBean from your PL/SQL business logic. For a JSP-based Web report, you must call the JavaBean from your report. In Reports Builder, the JavaBean automatically generates the barcode for you.

    Note:

    For information about the Java Importer, and the ORA_JAVA built-in package, see Oracle Reports online Help topics under Reference > Java Importer.
  • You can learn more about the barcode JavaBean on the Oracle Technology Network (OTN): on the Oracle Reports page (http://www.oracle.com/technetwork/middleware/reports/overview/index.html), navigate to Learn More and click Getting Started to display the Getting Started with Oracle Reports home page. In the list of topic sections on the left, click Any Format. In the expanded list of sub-topics, click PL/SQL-Java Bridge.

Example Scenario

In this example, you will build two reports, one for paper and one for the Web. The paper report shows an invoice for a single customer who has ordered multiple items from a company. The barcode indicates the tracking information for the order.

As you build these example reports, you will:

To see a sample paper report with a barcode, open the examples folder named barcodebeanpaper, then open result\shipping_manifest.pdf. To see a sample Web-based JSP report with a barcode, open the examples folder named barcodebeanweb, then open result\shipping_manifest_web.jsp. For details on how to open these reports, see "Accessing the Example Reports" in the Preface. The example files used in this chapter are listed and described in Table 43-1.

Table 43-1 Example report files

File Description

barcodebeanpaper\result\
shipping_manifest.pdf

The final PDF version of the paper report, containing the barcode.

barcodebeanpaper\result\
shipping_manifest.rdf

The final RDF version of the paper report, containing the barcode.

barcodebeanpaper\scripts\
oraclebarcode.jar

The barcode JavaBean.

barcodebeanpaper\scripts\
barcode_code.txt

All the code used in this chapter, so you can copy and paste the code from this file instead of typing it manually.

barcodebeanpaper\source\
shipping_manifest.rdf

The source file for the sample paper report. Running this RDF in Reports Builder will display the final result of your paper report in the Paper Design view.

barcodebeanweb\result\
shipping_manifest_web.jsp

The final JSP version of the Web report, containing the barcode.

barcodebeanweb\result\
shipping_manifest_web.rdf

The final RDF version of the Web report, containing the barcode.

barcodebeanweb\result\
assets

The images that Oracle Reports generated when the JSP was run.

barcodebeanweb\scripts\
sql.txt

The SQL for the query you need to enter.

barcodebeanweb\scripts\
barcode_code.txt

All the code used in this chapter, so you can copy and paste the code from this file instead of typing it manually.

barcodebeanweb\source\
shipping_label.html

The HTML page that you will use as a basis for the Web report.

barcodebeanweb\source\
shipping_manifest_web.rdf

The source file for the sample Web report. Running this RDF in Reports Builder to the Web will display the final result of your Web report in your browser.

barcodebeanweb\source\
assets\*

The images and other files that your JSP-based Web report will require to display properly on the Web.

barcodebeanweb\source\
assets\blaf_beige_logo.gif

The image you will use in your JSP-based Web report.