Ver Mensaje Individual
  #14  
Antiguo 11-10-2010
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 27
Caral Va por buen camino
Hola
Código Delphi [-]
procedure TFfactura.btn3Click(Sender: TObject);
begin
 if wfactura_a_imprimir<>0 then
  begin
   Application.CreateForm(TFticket, Fticket);
   Fticket.Dataset:= Qry_ticket;
   with Fticket.Qry_ticket do
    begin
      sql.Clear;
      SQL.Text:= 'select * from facturaItem where nofac = :Tfactura';
      Parameters.ParamByName('Tfactura').Value:=wfactura_a_imprimir;
      Open;
      try
      if not Fticket.Qry_ticket.IsEmpty then
      begin
      Fticket.txtcantidad.Caption:= FieldByname('cantidad').Value;
      Fticket.Preview;
      finally
      Fticket.Free;
      end;
      except
        on E:EOleException do
         begin
          MessageDlg(Format('Error: %s    Codigo: %d', [E.Message, E.ErrorCode]), mtError, [mbOK], 0);
         end;
    end;
end;
Saludos
__________________
Siempre Novato
Responder Con Cita