Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SelectPrinter Method help please.
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
SelectPrinter Method help please.
Miscellaneous
Thread ID:
00901243
Message ID:
00901243
Views:
123
Hi all,


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

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
Reply
Map
View

Click here to load this message in the networking platform