Difference between revisions of "PRINT"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=PRINT=
 
 
 
 
==Class==
 
==Class==
 
Printing
 
Printing
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[RUN]], [[SPAWN]], [[TYPE]], [[PUTENV()]]
+
[[DB_PRINT]], [[DB_PRINTOPT]], [[EJECT]], [[GETENV()]], [[PUTENV()]], [[RUN]], [[SET MARGIN]], [[SET PRINT]], [[SET PRINTER]], [[SPAWN]], [[TYPE]]  
  
  
Line 21: Line 18:
 
The PRINT command prints the specified <.txt filename> on the printer.  The filename can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename.  If no file extension is specified, then '.txt' is assumed.  If the file extension is '.tmp' the PRINT command will delete the file after printing it.
 
The PRINT command prints the specified <.txt filename> on the printer.  The filename can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename.  If no file extension is specified, then '.txt' is assumed.  If the file extension is '.tmp' the PRINT command will delete the file after printing it.
  
The Recital/4GL login file contains an environment variable called DB_PRINT which points to a file in the root directory called print.<operating system name>.  It contains the commands used by the host operating system to print files
+
The DB_PRINT and DB_PRINTOPT environment variables can be customized to configure print destinations and options.
The print.<operating system name> file can be customized for your own environment.  Multiple print files can be set up and assigned by changing the DB_PRINT environment variable with the PUTENV() function.  This allows particular printer files to be associated with a specified group of users, or particular printers.
+
  
  
Line 31: Line 27:
 
report form analysis to file &m_filenam
 
report form analysis to file &m_filenam
 
for i=1 to 4
 
for i=1 to 4
  print &m_filenam
+
    print &m_filenam
 
next
 
next
 
erase &m_filenam
 
erase &m_filenam
Line 41: Line 37:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Printing]]
 +
[[Category:Printing Commands]]

Revision as of 11:51, 11 June 2009

Class

Printing


Purpose

Print a text file on the printer


Syntax

PRINT <.txt filename> | (<expC>)


See Also

DB_PRINT, DB_PRINTOPT, EJECT, GETENV(), PUTENV(), RUN, SET MARGIN, SET PRINT, SET PRINTER, SPAWN, TYPE


Description

The PRINT command prints the specified <.txt filename> on the printer. The filename can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then '.txt' is assumed. If the file extension is '.tmp' the PRINT command will delete the file after printing it.

The DB_PRINT and DB_PRINTOPT environment variables can be customized to configure print destinations and options.


Example

// Print 4 copies of a report
m_filenam = sys(3) = ".txt"
report form analysis to file &m_filenam
for i=1 to 4
    print &m_filenam
next
erase &m_filenam


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer