JadePrintDirect Class

The JadePrintDirect class is a transient class that holds output directives that are sent directly to the printer. (The printer is a display device for previewing print output.)

These output directive objects are created in JADE by using the =direct option of the TextBox class or Label class formatOut property, which sends the text of the control formatted in the font of the control directly to the printer. This provides you with the ability to send commands to the print driver; for example, the facsimile (fax) number that is to be dialed when printing to a fax device, as shown in the code fragment in the following example.

create printForm;
app.printer.printPreview     := true;
app.printer.print(printForm.frameDirect);
printForm.listBox1.addItem("add 1");
printForm.listBox1.addItem("add 2");
printForm.faxLabel.formatOut := '=direct';
printForm.faxText.formatOut  := '=direct';
printForm.faxLabel.caption   := '<ToName:Dr. Who> <ToFaxnum:993999999>
                                <FromName:Ms. Tardis> <FromFaxnum:4321>';
printForm.faxText.caption    := '';
app.printer.print(printForm.frame1);
app.printer.print(printForm.frameDirect);
return;

By default, when a print preview is requested, a JadeReport object is created that contains an array of transient JadePrintDirect and JadePrintPage object entries. This JadeReport object is invisible and transparent to you.

Use the Printer class setReport method to capture this output for storage, manipulation, and printing to meet your requirements. Alternatively, use the Printer class printPage method to print the specified page of print output on the current printer.

Client-side facilities only are available. Print facilities cannot be invoked from a server method.

If you are running JADE in thin client mode, the printing is performed on the presentation client using a printer attached to the presentation client workstation. When the presentation client requests a print preview, the pages of the printed report do not have to be transferred to and from the application server. (This optimizes the performance of the print preview process when running JADE thin client mode over a slow network.) However, if your application calls Printer::setReport to indicate that user logic subsequently stores or manipulates the report output, each page of output is transferred to the application server.

When you use the formatOut property =pagenofm or =totalpages option for formats of data in text boxes or labels and the report is being stored in the database (that is, the report uses the Printer class setReport method), output is retrieved from a temporary file and stored in the database only after the printer is closed. (This is most evident when running in JADE thin client mode, as the printed output must be retrieved from the presentation client and passed to the application server at the end of the report rather than page by page as the report is produced.) For details, see the TextBox class or Label class formatOut property.

For details about the properties defined in the JadePrintDirect class, see "JadePrintDirect Properties", in the following subsection.

JadePrintData

(None)