Printing reports

There are five methods provided for printing a report.

Parameters

Example 1

With JDK1.2 or later, if you use the JDK1.2 printing method (boolean bUseJDK11), you can call the printReport method as shown below:

PrinterJob printJob=PrinterJob.getPrinterJob();
bean.printReport(printJob, printJob.defaultPage(), false, false, false);

Or, if you do not want to use getPrinterJob, you can simply call:

bean.printReport(null, null, false, false, false);

Example 2

With JDK1.2 or later, if you use the JDK1.1 printing method, you are best recommended not to use getPrintJob, instead you can call:

bean.printReport(null, null, false, false, true);

Notes: