Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page size
Message
De
06/12/2007 05:15:16
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01273148
Message ID:
01273525
Vues:
22
This message has been marked as the solution to the initial question of the thread.
Use that function:
dosprn("myprint.txt","HP on secretary")


func dosprn
LPARAMETERS xfile,xport

LOCAL xstr
  xstr=FILETOSTR(m.xfile)

	   SET PROC TO DIRPRTCLASS.PRG ADDITIVE
	   oDirPrt = CREATEOBJ('DirectPrintOutput')
    WITH oDirPrt
	      .PrinterOpen(m.xport) 
	      IF .PrinterIsOpen()
	         .DocOpen('MySpool')
	         .DocWrite(m.xstr)
	         .SpoolFile('MySpoolFile.TMP', .T.) 
	         .DocClose()
	         .PrinterClose()  
	      ELSE
	        DECLARE INTEGER CopyFile IN kernel32;
            	STRING lpSrcFile, STRING lpDstFile, INTEGER bFail
                           CopyFile(m.xfile,m.xport, 0)

	      ENDIF
	   ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform