Output_Wrap
See Also: BasicReport class, Append_Output, Direct_Output, Output, Print_Wrap
Purpose
To output an image repeatedly as necessary to output the contents of database fields or sequential text files through windows addressed by the print_wrap command. This command is only used with legacy style reports that use screen images for output formatting, such as the BasicReport class; most DataFlex reports do not use this technique (or this command).
Syntax
Output_Wrap [Channel {channel-num}] [{page-name}]
What It Does
Output_Wrap outputs the static and dynamic content of pagename to the device named in the direct_output or append_output command in force, outputting pagename repeatedly until all data in the input file or device for every window in pagename that was addressed with a print_wrap command has been output.
Example
Direct_Output "report.txt"
Output_Wrap
liaisons
In this example, Image liaisons is output to Sequential File REPORT.TXT.
For Output_Wrap to accomplish its intended purpose, at least one window in pagename must have a Text-type database field or an input sequential file or device assigned to it with a print_wrap command. Print_wrap and Output_Wrap require each other in order to work. Where no such window is present, a more efficient command to use is output.
/confessionimg
_________________ _________ ______________________________
/*
Open inmate
Find ge inmate.name
Print inmate.name To confessionimg.1
Print inmate.number To confessionimg.2
Print_Wrap inmate.confession To confessionimg.3
Output_Wrap
confessionimg
In this example, the first two fields, addressed by print, are non-wrapping and the third, intended to contain multi-line output, is addressed by print_wrap. After output of the name, number, and first line of Field confession, additional portions of confession would be output in repetitions of confessionimg until the contents of the field had been output in their entirety. The first two fields would be blank in any such repeated outputs, as would any other print_wrap window whose input data had been exhausted.
Data in windows is the usual purpose of output wrapping an image. All data desired to be present in the output must be printed, print-wrapped, or otherwise moved to the windows of pagename before the Output_Wrap is executed.
Empty windows in pagename will be output the first time as underscores unless they are blank-formed before the Output_Wrap command.
When append_output is in force, the point in a file at which writing is done can be changed by use of the set_channel_position command. Output wrapping before the end of a file overwrites existing data. There is no insert mode for sequential output.
Notes
-
If
pagenameis omitted, the current image will be output. Ifchannel channelNumis omitted, the channel will be that specified in the lastappend_output,direct_output,output,write, orwritelncommand in which channel was specified or implied. If no output destination has been specified for the channel used,Output_Wrapsends output to the printer. -
Output_Wrapcan output images containing no windows addressed byprint_wrap, but the process is slower than it is when theoutputcommand is used.