RobertRoth
14-Nov-2005, 06:07 PM
VDF11.0.77.0, Crystal Reports 10
HP 1160 (mono) and HP 2600n (color) laser printers
When either of these printers is set to the system default printer, the following code (with no
printer selection) results in a normal printed report
Procedure OninitializeReport
.......
Integer iDestination
Get PrintDestination to iDestination
If (iDestination=0) Set Output_Destination to CRW_PRINT_TO_WINDOW
If (iDestination=1) Begin
Set Output_Destination to CRW_PRINT_TO_PRINTER
End
End_Procedure
However, if SelectAndSetPrinter is used, the report printed to the 1160 is always printed correctly
and that printed to the 2600n appears to print a very small thumbnail of each page on the upper left
corner of the paper. This occurs independently of which printer is set as default. I have placed
SelectandSetPrinter in OnInitializeReport and OnStartPrinting with the same results, e.g:
Procedure OninitializeReport
.......
Integer iDestination
Get PrintDestination to iDestination
If (iDestination=0) Set Output_Destination to CRW_PRINT_TO_WINDOW
If (iDestination=1) Begin
//Set Output_Destination to CRW_PRINT_TO_PRINTER
send SelectAndSetPrinter
End
End_Procedure
Any ideas on how to overcome this would be much appreciated.
Bob Roth
Barton Nelson Inc.
KCMO
HP 1160 (mono) and HP 2600n (color) laser printers
When either of these printers is set to the system default printer, the following code (with no
printer selection) results in a normal printed report
Procedure OninitializeReport
.......
Integer iDestination
Get PrintDestination to iDestination
If (iDestination=0) Set Output_Destination to CRW_PRINT_TO_WINDOW
If (iDestination=1) Begin
Set Output_Destination to CRW_PRINT_TO_PRINTER
End
End_Procedure
However, if SelectAndSetPrinter is used, the report printed to the 1160 is always printed correctly
and that printed to the 2600n appears to print a very small thumbnail of each page on the upper left
corner of the paper. This occurs independently of which printer is set as default. I have placed
SelectandSetPrinter in OnInitializeReport and OnStartPrinting with the same results, e.g:
Procedure OninitializeReport
.......
Integer iDestination
Get PrintDestination to iDestination
If (iDestination=0) Set Output_Destination to CRW_PRINT_TO_WINDOW
If (iDestination=1) Begin
//Set Output_Destination to CRW_PRINT_TO_PRINTER
send SelectAndSetPrinter
End
End_Procedure
Any ideas on how to overcome this would be much appreciated.
Bob Roth
Barton Nelson Inc.
KCMO