Defining Your Jade Report Layouts

Define your report layouts in terms of frames on a standard Jade form. When you create a form and you specify that the form is of type Printer, the Jade Painter uses the appropriate default properties for printing controls.

Each report frame represents a logical grouping of data to ensure that it is printed together; for example, a header, a footer, a line on an invoice, and an outstanding balance on a statement. Printed frames can contain any standard Jade control.

If you want to generate white space on a page, you can use logic like that shown in the following code fragment rather than generating a blank frame.

if printer.getPrintPosition + whiteSpaceSize >= 
               printer.pageHeight - printer.footer.height then
    printer.newPage;
else
    printer.setPrintPosition(printer.getPrintPosition + whiteSpaceSize);
endif;

Use the formatOut property of the TextBox class or the Label class to specify the system-defined format of data in text boxes or labels. The format options listed in the following table are available.

Option Action
=date Prints the current date as specified in Control Panel.
=direct 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 when printing to a fax device.
  See the JadePrintDirect class for details about the transient class that holds output directives that are sent directly to the printer.
=formatdate

Prints the date in the format supplied in the formatOut text box of the Properties dialog Specific sheet in Jade Painter, as shown in the following example.

=formatdate dd/MM/yyy
=longdate Prints the current date in the long date format.
=page Prints the current page number.
=pagenofm Prints the current page number of the total number of pages in the document (for example, 2 of 8).
=shortdate Prints the current data in the short date format.
=time Prints the current time (in hh:mm:ss am / pm format).
=totalpages Prints the total number of pages in the document (for example, 8).

For details about placing print output directly on a printer page at any location on the page without using frames, see "Free-Format Printing", later in this section.