Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SelectPrinter Method and VFP 8

Status
Not open for further replies.

AMLINE

MIS
Mar 6, 2004
5
0
0
BE
Hi all,


I have problems with the order ' selectPrinter' for several weeks.(CR 8.5) AND VFP 8

In the viewer_printButtonClicked() I have this code :


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

THIS.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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top