Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selectprinter Problems With VFP ( CR 8.5)
Message
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Selectprinter Problems With VFP ( CR 8.5)
Miscellaneous
Thread ID:
00901469
Message ID:
00901469
Views:
95
Craig,

Please help me.

I believe that there is a problem with the order 'selectprinter' and Vfp.
Please craig , Put this code in your PrintButtonClicked() ( Preview Form ).

If you use 'selectprinter' , all settings are lost.... !( quality paper or print on the both side....)
In your book you use the order 'selectprinter'.
What I do not make correctly ?
*-- Se déroule lorsqu'on click sur le Print button de preview.02/2004
usedefault = .F.

WITH THISFORM.oCrystal.crreport  && Or rpt.
  cOrientation = .PaperOrientation
  cSize = .PAPERSIZE

  *-- here Please change quality paper or print on the both side....
  .Printersetup( _SCREEN.HWND )

  m.numOfPrinters = APRINTERS(printerList)
  IF m.numOfPrinters  > 0

    FOR m.i = 1 TO m.numOfPrinters && ALEN( printerList , 1 )*

      IF printerList[m.i, 1] = .PrinterName
        .SelectPrinter( 'winspool' , .PrinterName , 'neo1:' )
        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

Thank in advance for help craig
Next
Reply
Map
View

Click here to load this message in the networking platform