Ver Mensaje Individual
  #3  
Antiguo 11-12-2003
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Otra manera que funciona bien con 2k (sacado de mi web de la demo del TListView y probado )

Código:
procedure TForm1.ImprimirCanvasClick(Sender: TObject);
var y, i, j : integer;
    temp : string;
begin
     Printer.BeginDoc; 
     With Printer.canvas do 
      Begin
           Printer.Title := 'El titulo del documento que quiero'; 
           Font.Name := 'MS Sans Serif'; 
           Font.Color := ClBlack; 
           Pen.Color := ClBlack; 
           Font.Size := 12; 
           Font.Name := 'Times New Roman';
           Font.Size := 12;

           // imprimimos ListView
           temp := 'Titulo que sale escrito en el papel';
           y := 100;
           TextOut(10, y, temp);
           for i := 0 to ListView1.Items.Count - 1 do
            begin
                 inc(y, 20);
                 temp := ListView1.Items[i].Caption;
                 for j := 0 to ListView1.Items[i].SubItems.Count - 1 do
                     temp := temp + ' ' + ListView1.Items[i].SubItems[j];
                 TextOut(10, y, temp);
            end;
      end;
     Printer.EndDoc;
end;
Responder Con Cita