Hi all,
I have problems with the order ' selectPrinter' for several weeks.(CR 8.5) AND VFP 8
All the settings are lost after selectprinter() !
In the viewer_printButtonClicked() I have this code :
PROCEDURE printButtonClicked()
LPARAMETERS usedefault
*-- Se déroule lorsqu'on click sur le Print button de preview.02/2004
usedefault = .F.
WITH THISFORM.oCrystal.crreport && PreviewForm
cOrientation = .PaperOrientation
cSize = .PAPERSIZE
.Printersetup( _SCREEN.HWND ) && Settings in VFP Window
m.numOfPrinters = APRINTERS(printerList)
IF m.numOfPrinters > 0
FOR m.i = 1 TO m.numOfPrinters
IF printerList[m.i, 1] = .PrinterName
.SelectPrinter( '' , .PrinterName , '' )
EXIT
ENDIF
ENDFOR
.PaperOrientation = cOrientation
.PAPERSIZE = cSize
*!* Dim p As Printer
*!* For Each p In Printers
*!* If p.DeviceName = crxRpt.PrinterName Then
*!* crxRpt.SelectPrinter p.DriverName, p.DeviceName, p.Port
*!* Exit For
*!* End If
*!* Next p
*-- Here is a probleme WITH VFP !
*-- All the settings are Lost with SelectPrinter !
*--
.PrintOut( .T. , 1)
ENDIF
ENDWITH
Please help me
Good Evening
bernhart
I have problems with the order ' selectPrinter' for several weeks.(CR 8.5) AND VFP 8
All the settings are lost after selectprinter() !
In the viewer_printButtonClicked() I have this code :
PROCEDURE printButtonClicked()
LPARAMETERS usedefault
*-- Se déroule lorsqu'on click sur le Print button de preview.02/2004
usedefault = .F.
WITH THISFORM.oCrystal.crreport && PreviewForm
cOrientation = .PaperOrientation
cSize = .PAPERSIZE
.Printersetup( _SCREEN.HWND ) && Settings in VFP Window
m.numOfPrinters = APRINTERS(printerList)
IF m.numOfPrinters > 0
FOR m.i = 1 TO m.numOfPrinters
IF printerList[m.i, 1] = .PrinterName
.SelectPrinter( '' , .PrinterName , '' )
EXIT
ENDIF
ENDFOR
.PaperOrientation = cOrientation
.PAPERSIZE = cSize
*!* Dim p As Printer
*!* For Each p In Printers
*!* If p.DeviceName = crxRpt.PrinterName Then
*!* crxRpt.SelectPrinter p.DriverName, p.DeviceName, p.Port
*!* Exit For
*!* End If
*!* Next p
*-- Here is a probleme WITH VFP !
*-- All the settings are Lost with SelectPrinter !
*--
.PrintOut( .T. , 1)
ENDIF
ENDWITH
Please help me
Good Evening
bernhart