SET PRINTER TO NAME GETPRINTER() myPrinter =SET("Printer",3) IF myPrinter <> oRep.PrinterName ** SET the printer correctly ENDIF>Mike,
>>Local cDef_printer >>cDef_printer = SET("PRINTER",2) && Or SET("PRINTER",3) >>ocrreport.PrinterName=cDef_printer >>>>
>>> >>>SET DEFAULT TO ( cdirectory ) >>> >>>gnNombreDbc = ADIR( gaBaseDonnées, '*.Rpt') && Crée un tableau >>>SET DEFAULT TO ( SetOldDefault ) >>> >>>ocrapplication = CREATEOBJECT('CrystalRuntime.Application.8.5') >>> >>> >>>FOR nCompteur = 1 TO gnNombreDbc && Effectue une boucle pour connaître le nombre de bases de données >>> cName = "C:\cdbk70\amline\ReportsCrystal\" + PROPER( gaBaseDonnées( nCompteur , 1 ) ) >>> WAIT WIND cName NOWAIT && Affiche le nom des bases de données >>> >>> ocrreport = ocrapplication.OpenReport( cName , 1 ) >>> ocrreport.DATABASE.verify() >>> ocrreport.SAVEAS( cName , 2048 ) >>> ocrreport = .NULL. >>>ENDFOR >>> >>>>>>