PrintInfo Reference > PrintInfo Object Methods > PrintPreview Method |
PrintPreview Method
The PrintPreview method opens a separate application window in which end users can preview the output that would be generated by the PrintData method.
PrintInfo.PrintPreview [selector]
Arguments
selector is an optional RowSelectorConstants value that specifies the rows to be previewed.
Return Value
None
Method applies to PrintInfo object.
If desired, end users can also print the data before closing the preview window.
Generally, the output is formatted for the system default printer, although you can use the PageSetup method to enable end users to select a different printer prior to calling the PrintPreview method.
The selector argument determines the rows to be previewed. It can be one of the following constant values:
0 - dbgAllRows |
All available rows are previewed. If the selector argument is omitted, this value is assumed. |
1 - dbgSelectedRows |
Only selected rows are previewed. The list's SelBookmarks collection contains a bookmark for each selected row. |
2 - dbgCurrentRow |
Only the current row is previewed. The list's Bookmark property returns the bookmark of the current row. |
The printed output preserves as much of the associated list's original formatting as possible, including colors, fonts, alignment, and relative column widths. If present, the list caption, split captions, column headers, and column footers are displayed on the first page. You can force these elements to be repeated on each physical page by setting the RepeatSplitHeaders, RepeatColumnHeaders, and RepeatColumnFooters properties to True.
If you are developing a non-English application, or an international application, you can use the SetMenuText method to change the names of the menu commands in the PrintPreview window.
Note: Use the PrintData method to send data directly to the printer without end user intervention.
See Also