Basics of Printing a Presentation Bean

There is a separate printer class for each presentation bean. Just as the Graph class and a GridView class both extend the Dataview class, the GraphPrinter class and the GridViewPrinter class both extend the ViewPrinter. Likewise, as the Table and Crosstab classes extend the GridView, the TablePrinter and CrosstabPrinter extend the GridViewPrinter. You use the printer class for the presentation bean that you want to print. For example, to print a table, you use the TablePrinter object.

The following figure depicts the relationships that are described in this topic.

Inheritance of Dataviews and ViewPrinters; described in text

The view printer classes support the 2 kinds of Java printing, AWT (java.awt.Toolkit class) and 2D printing (in the java.awt.print package). All the print dialog boxes are based on 2D printing.

In addition to the view printer classes, BI Beans provides a graphical user interface for printing. This support includes the following classes, all of which are in the oracle.dss.dataView.gui package.

Class

Description

PrintDialog

Dialog for printing a view or a page of a view

PreviewDialog

A preview of a printed view

PageSetupDialog

Dialog for page options, such as headers and footers

Methods that you use for printing

BI Beans has different levels of printing support:

Packages and classes to import

All printing support requires the oracle.dss.dataView.ViewPrinter class.

To print a table, import the oracle.dss.table.TablePrinter class.

To print a graph, import the oracle.dss.table.GraphPrinter class.

To print a crosstab, import the oracle.dss.table.CrosstabPrinter class.

To use the user-interface classes that are provided for Java-client applications, import the oracle.dss.dataView.gui package, or the following classes and interface from that package:

To print without using the BI Beans user-interface classes, import the java.awt.Toolkit class (for a print job) or the java.awt.print package (for a printer job), and import the oracle.bali.ewt.util.WindowUtils class, or some other class from which you can get a Frame object.

To have fine control of row and column printing in tables and crosstabs, import the oracle.dss.dataView.DataSubsetRecord class.