If _VFP.StartMode = 4
If goApp.ReadKey("Insitialized", 0) = 0
If IsWinUserAdmin()
lcResult = goApp.DoFormEx("Impresora.scx")
SetPageSize("Tarjeta PVC", 8.61, 5.41, Nvl(lcResult, ""))
goApp.SetInfoToReport(lcResult)
EndIf
EndIf
EndIf
Parameters tcPrinter
Local lcFileName, lnIndex, lnCount, loProps, lnPaperID
With This
lnPaperID = FindPaperID("Tarjeta PVC")
loProps = NewObject("uo_properties", "class\application.vcx")
lnCount = ADir(laFiles, ForcePath("*.FRX", "Reports"))
For lnIndex = 1 To lnCount
lcFileName = FullPath(ForcePath(laFiles(lnIndex, 1), "Reports"))
Use (lcFileName) In 0 Alias dbReporte Exclusive
Select dbReporte
Locate For ObjType = 1 and ObjCode = 53
If Found()
loProps.Load(dbReporte.Expr)
loProps.WriteProperty("DRIVER", "winspool")
loProps.WriteProperty("DEVICE", tcPrinter)
loProps.WriteProperty("OUTPUT", "USB1:")
loProps.WriteProperty("ORIENTATION", 0)
loProps.WriteProperty("PAPERSIZE", lnPaperID)
lcExpr = loProps.Retrieve()
Replace Expr With lcExpr, Tag With "", Tag2 With ""
EndIf
Use In Select("dbReporte")
EndFor
EndWith
Return