Using the Report Viewer
To allow end users to preview how your WinPrint 2 report will appear on the printed page, your application should use the Report Viewer. The report viewer renders a report in WYSIWYG (what you see is what you get) fashion to the screen.
Your application can specify that a report is sent to the viewer by setting the Output_Device_Mode property in your cWinReport2 object to PRINT_TO_WINDOW. For example:
Set Output_device_mode to PRINT_TO_WINDOW
The report viewer will display your report one page at a time in a special preview window. This window is free-floating and can be resized and repositioned on your screen as desired. The report viewer supports:
-
Zooming and scrolling: You can zoom in and out to change the report view’s magnification and scroll up, down, left, and right to see parts of the page that do not fit in the window.
-
Page navigation: Features include page forward, page backward, go to first, go to last, and jump to page. Use these features to navigate the pages of a multi-page report.
-
Print hard copy: The Report Viewer supports sending the previewed report to the printer. You can select the desired page range, number of copies, or print to file.
-
Copy to clipboard: Use this feature to copy part of the current page to the clipboard as a graphic. You can use the mouse to click and drag to select a region of the page to be copied.
The report viewer is active as soon as the first page has been sent to it by your application. Users can operate the viewer normally and perform every operation while your report is being sent to the viewer. The only operation not available until the entire report has been sent to the viewer is the Print operation.