Ver Mensaje Individual
  #8  
Antiguo 05-09-2007
emimarz emimarz is offline
Registrado
 
Registrado: sep 2007
Posts: 5
Reputación: 0
emimarz Va por buen camino
Cita:
Empezado por luchifer Ver Mensaje
Perdon me equivoquede rutina pra enviar a excel los datos del query. Aqui t va la rutina para impresion directa

procedure TFpto_pollo.imprime_fac(stdoc, stipo:shortstring;sndoc:integer);
Var MyPrinter: TextFile;
xcan, xdes, xval, xtot, xpag, xcam:shortstring;
xsum:real;
begin
AssignFILE(MyPrinter,'LPT1');
ReWrite(MyPrinter);
Write(MyPrinter, CHR(27) + CHR(64)); // Inicializar Impresora
//Write(MyPrinter, CHR(27)+CHR(67)+CHR(44)); // Fijar Tamaño en Lineas
Write(MyPrinter,CHR(27)+ CHR(103)); // Tipo de Letra Chicas
//Write(MyPrinter,CHR(27)+CHR(197)); // Negrita
//Write(MyPrinter,CHR(27)+CHR(179)+CHR(28)); // Espacio entre Lines
if stipo='FAC' then Writeln(MyPrinter,'MICROMARKET VIA RAPIDA') else Writeln(MyPrinter,'POLLOS ROSS');
if stipo='FAC' then Writeln(MyPrinter,'AV.ROQUE AGUILERA ESQ.RADIAL CASTILLA') else Writeln(MyPrinter,'AV.SANTOS DUMONT CASI 4TO ANILLO');
if stipo='FAC' then Writeln(MyPrinter,'NIT 2642735017 TELF.3513621') else Writeln(MyPrinter,'NO ES FACTURA TELF.3533417');
if stipo='FAC' then Writeln(MyPrinter,'FACTURA : '+wnrofac.text+' ALFAB.'+walfab.text);
if stipo='FAC' then Writeln(MyPrinter,'NR.ORDEN:'+wnorden.text+' FECHA:'+datetostr(now));
if wnomfac.Text<>'' then
Writeln(MyPrinter,'Senores : '+wnomfac.text)
else
Writeln(MyPrinter,'Senores : Clientes Varios');
//----------------------------
.............

Writeln(MyPrinter,'-------------------------------------');
xtot:=format('%8.2f',[xsum]);
xpag:=format('%8.2f',[strtofloat(wpagbs.text)]);
xcam:=format('%8.2f',[strtofloat(wcamb.text)]);
Writeln(MyPrinter,' Total Facturado : '+xtot);
Writeln(MyPrinter,' Total Pagado : '+xpag);
Writeln(MyPrinter,' Cambio : '+xcam);
Writeln(MyPrinter,'-------------------------------------');
if stipo='FAC' then Writeln(MyPrinter,'MICROMARKET VIA RAPIDA LE AGRADECE') else Writeln(MyPrinter,'POLLOS ROSS LE AGRADECE');
Writeln(MyPrinter,'POR SU PREFERENCIA '+stdoc+'-'+inttostr(sndoc));
.................
Writeln(MyPrinter,'');
//Write(MyPrinter,#12); // Expulsar la Hoja
System.CloseFile(MyPrinter);
end;

Y funciona re bien
esta fantastico este codigo

pero por esas casualidades para colocarlo en las cordenadas X e Y como se hace???

me dijeron que es con el modo grafico de la impresora pero no logro dar con la tecla
Responder Con Cita