REPORT.OUTPUT_FILE_OVERRIDE Function

Syntax

Last_Output_File as C = .Output_File_Override(C filename)

Arguments

filename

The name of the file to print next. Turn override off by setting Filename to a NULL string ("").

Description

Override the Report printer output file.

Discussion

The REPORT.OUTPUT_FILE_OVERRIDE() method sets the output file to Filename for all subsequent print operations. Alpha Anywhere will use Filename regardless of whether the layout specifies an explicit output filename. Also, Alpha Anywhere will print to the specified file regardless of whether the layout specified print to file or not. Last_Output_File is the name of the out file that Alpha Anywhere was previously set to use. This allows you to restore the previously set output filename.

Example 

Set the printer and output filename, prints a report to file, then restores the printer and output filename.

last_printer = :report.printer_override("PostScript")
last_filename = :report.output_FILE_override("c:\data\report.ps")
:report.print("invoices")
:report.printer_override(last_printer)
:report.output_file_override(last_filename)

See Also