# PRINT

Syntax:

Then: print

PRINT can be used on output processing tables only.

Version Ref: 3.x

Description:

Prints current record.

IMPORTANT: If a PRINT statement is used anywhere on the processing table, then it MUST be encountered or the record will NOT print.

Examples:

If: 4 ne "C"
Then: end
Then: print ; end

When the above code is run against a group of records, only those which have field 4 equal to "C" will print on the report. All other records will not show up on the report. Normally (without any PRINT statement on the processing table) every record will be printed on a report. This is a very powerful feature of PRINT and you must be aware of exactly how it functions or you will not understand why some records are printing and others aren't. If the PRINT statement is encountered AND it has a TRUE "if" condition or a blank "if" condition (which defaults to TRUE), the record will print, otherwise, it will be dropped off the report and, more importantly, OUT OF ANY TOTALING that filePro is doing for you automatically (using =N on the output format)!

PRINT lets you control the printing of individual records from processing. Use PRINT to do such things as processing all records but printing only certain ones; and printing more than one copy of a record.

To print multiple forms per record, you can set up a counter and then loop through the set of elements until the count is exhausted.

Then: input ct(2,.0) "Print how many copies?"
loop If: ct gt "0"
Then: print; ct = ct-"l"; goto loop