Reporting : Batch Documentation Facility : Available commands : REPORT: Include reports : Printing files
  
Printing files
You can use the PORT subcommand to specify which output port or text file a diagram or report is printed to.
The type of printer device depends on the current default printer for that port, and must be set appropriately in Windows prior to using the Doc Facility command.
To change the specified port in the DCF file in either the REPORT or DIAGRAM command statement, use:
REPORT "report-name" { PORT port-name }
To specify the output of a report or diagram to be directed to a file having the settings of a file named in the WIN.INI, simply state the file name after the PORT subcommand.
DIAGRAM "name" { PORT <filename> }
REPORT "name" { PORT <filename> }
Multiple port settings
If you plan to direct the output of a document to a file, and want to ensure the proper settings are applied when the document is finally printed to hard copy, the flexibility of multiple port settings will help you.
You can set options when printing to a port. The options dependent on the printer being used for the port. The options include printing in landscape mode or portrait mode, and printing at a specified resolution. Every port can be set up with unique settings, but each individual port can, of course, only have one setting. Therefore, if a DCF file is set up with instructions to print a diagram once in portrait mode and once in landscape mode, the user would have to set up two ports with the desired settings, and specify that the diagram print to both ports in the command sequence.
Specifying an individual print file
You can use the PORT subcommand to specify the printer that will receive the diagram or report. For example, you can specify LPT1 or LPT2. You can also use the PORT command to direct the output of a diagram or report to a file. In this case you use the PORT command to specify the name and format of the file that the output is directed to.
To direct the output of an individual report to an individual file, use:
REPORT "All Data Elements" { PORT DATAELEM.DOC }
In this example, the report “All Data Elements” is printed to the DATAELEM.DOC file.
Note You must setup the DATAELEM.DOC file prior to running the document in which it is specified:
1 In System Architect®, open a diagram.
2 On the main menu click File > Print.
3 In the Print dialog in the on field replace the current port identification with the name of the output file; for example, DATAELEM.DOC; then click Setup.
4 In the setup dialog specify the desired printer settings to be used for the file. Click the Advanced button to specify the additional settings; then click OK.
This will save the new port settings to the WIN.INI file.
5 In the Print dialog box, click Cancel.
See also
REPORT: Include reports