Ver Mensaje Individual
  #3  
Antiguo 17-12-2006
Leto_Atreides Leto_Atreides is offline
Miembro
 
Registrado: jun 2006
Posts: 19
Reputación: 0
Leto_Atreides Va por buen camino
Versión : Delphi 5

No imprimo a través de ningún Report.

Componentes?? Estándares

El procedimiento es el siguiente:

begin
LlenarFIni; //recojo los datos del fichero de texto
FMenu.IMP.PrimeraLinea:=PrimeraLinea; //Aqui empieza la impresion
FMenu.IMP.UltimaLinea:=UltimaLinea; //Fin de pagina
FMenu.IMP.EntreLineas:=EntreLineas; //Distancia entre líneas
if not error then begin
try
Printer.Orientation:=poPortrait;
Printer.BeginDoc;
BD.Tpresupuestos.close;
BD.TPresupuestos.open;
......
......
FMenu.Imp.Texto(ccli,fcli,'Cliente'); //por ejemplo
.....
.....

IMPRIMO DIRECTAMENTE SOBRE EL CANVAS DE LA IMPRESORA

procedure TImpresion.Texto(x,y:real;c:string);
begin
Printer.Canvas.TextOut(LocX(x),LocY(y),c);
end;

function TImpresion.LocX(x:real):longint;
begin
LocX:=Round(x*(ancho/horiz)*10);
end;

function TImpresion.LocY(y:real):longint;
begin
LocY:=Round(y*(largo/vert)*10);
end;

procedure TImpresion.Texto(x,y:real;c:string);
begin
Printer.Canvas.TextOut(LocX(x),LocY(y),c);
end;
Responder Con Cita