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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SelectPrinter ( CR 8.5 ) Problems AND VFP

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
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 the the SelectPrinter() method is not actually working.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top