Command WR PRINT

4D Write

WR PRINT

version 6.0


WR PRINT (area; mode; nbCopies)

ParameterTypeDescription
areaLongint4D Write area
modeInteger0=Values
1=References
nbCopiesIntegerNumber of copies to be printed

Description

The WR PRINT command prints the document contained in area. This command is the procedural equivalent of choosing Print... from the File menu without the display of the printing dialog boxes.

WR PRINT prints area once. Use WR PRINT MERGE if you want to print area once for each record in a selection.

There are two choices for printing:

•If you pass the constant wr print references (value 1) in mode, referenced elements appear between left and right double angle brackets (« ») in your 4D Write area.

•If you pass the constant wr print values (value 0) in mode, the values of the referenced elements will be printed in the 4D Write area.

WR PRINT does not compute references. If you want the references to be updated before printing, execute the statement WR EXECUTE COMMAND (area;wr cmd compute references) before WR PRINT.

The nbCopies parameter controls the number of copies to be printed.

Example

The following example is the method for a button used on the form that contains area. If you click on this button, area will be printed. The document contains references that have to be updated before printing:

   WR EXECUTE COMMAND (area;wr cmd compute references)
   WR PRINT (area; wr print values;1)

See Also

WR PRINT MERGE.