te muestro todo el modulo para que lo veas, la imagen funciona en cualquier impresora, tanto en laser como en matriz
Code: Select all
static Procedure PrnOT()
local oPrn, aFont[6], nFila, nRow, nCantLine, n, nTmp, aRowCol, aSize
if !MsgYesNo( "Desea imprimir OT" , "Usuario" )
return
endif
PRINT oPrn PREVIEW MODAL TO (ViewUsu():ordentrabajo)
DEFINE FONT aFont[1] NAME "COURIER NEW" SIZE 0, -8 OF oPrn
DEFINE FONT aFont[2] NAME "COURIER NEW" SIZE 0, -10 OF oPrn
DEFINE FONT aFont[3] NAME "ABADI MT CONDENSED" SIZE 0, -10 BOLD OF oPrn
DEFINE FONT aFont[4] NAME "COURIER NEW" SIZE 0, -8 BOLD OF oPrn
DEFINE FONT aFont[5] NAME "COURIER NEW" SIZE 0, -9 BOLD OF oPrn
DEFINE FONT aFont[6] NAME "COURIER NEW" SIZE 0, -8 BOLD UNDERLINE OF oPrn
oPrn:SetPage(1)
oPrn:cDocument := "Impresión orden de trabajo"
oPrn:StartPage()
oPrn:CmSay(0.7,1.5, " WIN-INVENT", aFont[4] )
oPrn:CmSay(1.0,1.5, Parame->Nom_emp,aFont[4] )
oPrn:CmSay(1.0,15, "Fecha:"+dtoc(DateAds()),aFont[1] )
oPrn:CmSay(1.3,1.5, Parame->Dir_Emp ,aFont[1] )
oPrn:CmSay(1.3,15, "Hora :"+TimeAds(),aFont[1])
oPrn:CmSay(1.6,1.5, Parame->Ciu_Emp, aFont[1] )
oPrn:CmSay(1.9,1.5, Parame->Fon_Emp, aFont[1] )
oPrn:CmSay(2.2,8, "ORDEN DE TRABAJO ("+ upper(ALLTRIM(Ot2Tipo( Docu_OT->Tip_OT )) ) + " Nº " + Alltrim(Docu_OT->Num_OT)+")", aFont[3] )
nFila := 3.5
nRow := 1.7
oPrn:CmSay( nFila, 1.5, "Datos del Cliente", aFont[6] )
oPrn:CmSay( nFila, 11.5, "Datos del Vehículo", aFont[6] ) ; nFila += .4
oPrn:CmSay( nFila, nRow, "Rut " + ":"+nRutVer(Docu_Ot->Rut_Cli), aFont[1] )
if Docu_Ot->Sto_Cli > 0
oPrn:CmSay( nFila, 11.7, "Nº Stock " + ":"+ltrim(Str(Docu_Ot->Sto_Cli)), aFont[1] ) ; nFila += .3
else
oPrn:CmSay( nFila, 11.7, "Patente " + ":"+Patente->Num_Pat, aFont[1] ) ; nFila += .3
endif
oPrn:CmSay( nFila, nRow, "Razon social" + ":"+Clientes->Nombre, aFont[1] )
if Docu_Ot->Sto_Cli > 0
oPrn:CmSay( nFila, 11.7, "Modelo " + ":"+NumStock->Des_Stock, aFont[1] ) ; nFila += .3
else
oPrn:CmSay( nFila, 11.7, "Modelo " + ":"+Patente->Modelo, aFont[1] ) ; nFila += .3
endif
oPrn:CmSay( nFila, nRow, "Dirección " + ":"+Clientes->Dir_Cli,aFont[1] )
if Docu_Ot->Sto_Cli > 0
oPrn:CmSay( nFila, 11.7, " " + " ", aFont[1] ) ; nFila += .3
else
oPrn:CmSay( nFila, 11.7, "Vim " + ":"+Patente->Vin, aFont[1] ) ; nFila += .3
endif
oPrn:CmSay( nFila, nRow, "Ciudad " + ":"+VerTabla( "CIU"+Clientes->Ciu_Cli),aFont[1] )
oPrn:CmSay( nFila, 11.7, "Kilometraje " + ":"+ltrim(str(Docu_Ot->KM_Cli)), aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.5, "Estado del vehículo (observaciones)", aFont[6] )
oPrn:CmSay( nFila, 11.5, "Detalle del servicio", aFont[6] ) ; nFila += .4
nTmp := nFila
nCantLine := MlCount( Docu_OT->Estado_Veh, 45 )
for n = 1 to nCantLine
oPrn:CmSay( nFila, nRow, MemoLine( Docu_OT->Estado_Veh,45,n ), aFont[1] )
if !empty( MemoLine( Docu_OT->Estado_Veh,45,n) )
nFila += .3
endif
next
nRow := 11.7
nCantLine := MlCount( Docu_OT->Detalle_Ve, 50 )
for n = 1 to nCantLine
oPrn:CmSay( nTmp, nRow, MemoLine( Docu_OT->Detalle_Ve,50,n), aFont[1] )
if !empty( MemoLine( Docu_OT->Detalle_Ve,50,n) )
nTmp += .3
endif
next
nFila := MAX( nFila, nTmp )
nRow := 1.7
nFila += .5
oPrn:CmSay( nFila, 1.5, "**Accesorios del Vehiculo**", aFont[6] )
oPrn:CmSay( nFila,11.5, "**Nivel de Bencina**", aFont[6] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Documentos ["+iif( Docu_OT->Documento, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Triangulos ["+iif( Docu_OT->Triangulo, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila,11.7, iif( Docu_Ot->Nivel_Benc = 1, "1/4",;
iif( Docu_Ot->Nivel_Benc = 2, "1/4 - 1/2",;
iif( Docu_Ot->Nivel_Benc = 3, "1/2 - 3",;
iif( Docu_Ot->Nivel_Benc = 4, "3/4+", "" ) ) ) ), aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Llaves ["+iif( Docu_OT->Llaves, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Rueda Repuesto ["+iif( Docu_OT->Rueda_Rep, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila,11.5, "**Cargo Orden de Trabajo**", aFont[6] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Espejo Int. ["+iif( Docu_OT->Espejo_In, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Gata ["+iif( Docu_OT->Gata, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 11.7, iif( Docu_Ot->Cargo_OT = 1, "Cliente",;
iif( Docu_Ot->Cargo_OT = 2, "Cia.Seguro",;
iif( Docu_Ot->Cargo_OT = 3, "E.Garantía",;
iif( Docu_Ot->Cargo_OT = 4, "Otro Cliente", "" ) ) ) ), aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Espejo Ext. ["+iif( Docu_OT->Espejo_Ex, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Herramientas ["+iif( Docu_OT->Herramien, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 11.5, "**Fecha y Hora Ingreso Taller**", aFont[6] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Plumillas ["+iif( Docu_OT->Plumillas, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Cint.Seguridad ["+iif( Docu_OT->Cint_Segur, "SI", "NO" ) + "]", aFont[1] )// ; nFila += .5
oPrn:CmSay( nFila,11.7, Dtoc( Docu_OT->Fec_OT ) + " / " + Docu_Ot->Hora, aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Pisos ["+iif( Docu_OT->Pisos, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Tapa bencina ["+iif( Docu_OT->Tapa_Benc, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 11.5, "**Compromiso de entrega**", aFont[6] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Tapa Radiador["+iif( Docu_OT->Tapa_radia, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Tapa Rueda 1234["+iif( Docu_OT->Tapa_Rueda, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila,11.7, Dtoc( Docu_OT->Fec_Ent ) + " / " + Docu_Ot->Hora_Ent, aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Extintor ["+iif( Docu_OT->Extintor, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Encendedor ["+iif( Docu_OT->Encendedor, "SI", "NO" ) + "]", aFont[1] ) ; nFila += .5
oPrn:CmSay( nFila, 1.7, "Botiquin ["+iif( Docu_OT->Botiquin, "SI", "NO" ) + "]", aFont[1] )
oPrn:CmSay( nFila, 5.5, "Antena ["+iif( Docu_OT->Antena, "SI", "NO" ) + "]", aFont[1] ) ; nFila += .8
if file( "imagen\vehiculo.bmp" )
aRowCol := oPrn:Cmtr2Pix(nFila,6)
aSize := oPrn:Cmtr2Pix(10,12)//m->x,m->y)
oPrn:SayBitmap( aRowCol[1], aRowCol[2], "imagen\vehiculo.bmp", aSize[2], aSize[1] )//3000, 2000 )//m->x1, m->x2 )
endif
oPrn:CmSay( 25, 6.5, " CLIENTE ", aFont[6] )
oPrn:CmSay( 25, 11.5, " RECEPCIONISTA ", aFont[6] )
oPrn:EndPage()
ENDPRINT
aEval( aFont, { |x| x:End() } )
return
//--------------------------------------------------------------------------------------------------------