Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #19  
Antiguo 02-03-2007
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 27
Caral Va por buen camino
Hola
Gracias jhonny
Asi Quedo:
Código Delphi [-]
procedure TFReporteDiario.DTP1Change(Sender: TObject);
begin
   ADOQuery1.Active:= False;
   ADOQuery1.SQL.Text:= 'SELECT DISTINCTROW Factura.Fecha, Factura.Terminos, Sum(Factura.MntTotal) AS SumaDeMntTotal '+
                        ' FROM Factura '+
                        ' WHERE Factura.Fecha = :Fecha AND Factura.Terminos = "Contado" '+
                        ' GROUP BY Factura.Fecha, Factura.Terminos ';
    ADOQuery1.Active:= True;
    ADOQuery1.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));
   // esta opcion tambien sirve
  //  ADOQuery1.Parameters.ParamByName('fecha').value := StrToDate(DateToStr(DTP1.Date));
  //  ADOQuery1.Parameters.ParamByName('fecha').DataType:=ftDate ;
    ADOQuery2.Active:= False;
   ADOQuery2.SQL.Text:= 'SELECT DISTINCTROW Factura.Fecha, Factura.Terminos, Sum(Factura.MntTotal) AS SumaDeMntTotal '+
                        ' FROM Factura '+
                        ' WHERE Factura.Fecha = :Fecha AND Factura.Terminos = "Credito" '+
                        ' GROUP BY Factura.Fecha, Factura.Terminos ';
    ADOQuery2.Active:= True;
    ADOQuery2.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

   ADOQuery3.Active:= False;
   ADOQuery3.SQL.Text:= 'SELECT DISTINCTROW PagosAdelanto.FechaTransac, Sum(PagosAdelanto.MontoCompra) AS [Suma De MontoCompra], Sum(PagosAdelanto.Abono) AS [Suma De Abono] '+
                        ' FROM PagosAdelanto'+
                        ' WHERE PagosAdelanto.FechaTransac = :FechaTransac'+
                        ' GROUP BY PagosAdelanto.FechaTransac ';
    ADOQuery3.Active:= True;
    ADOQuery3.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

    ADOQuery4.Active:= False;
   ADOQuery4.SQL.Text:= 'SELECT DISTINCTROW BancoNac.FechaTransac, Sum(BancoNac.Retiros) AS [Suma De Retiros], Sum(BancoNac.Depositos) AS [Suma De Depositos] '+
                        ' FROM BancoNac'+
                        ' WHERE BancoNac.FechaTransac = :FechaTransac'+
                        ' GROUP BY BancoNac.FechaTransac ';
    ADOQuery4.Active:= True;
    ADOQuery4.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

    ADOQuery5.Active:= False;
   ADOQuery5.SQL.Text:= 'SELECT DISTINCTROW BancoSanJoseco.FechaTransac, Sum(BancoSanJoseco.Retiros) AS [Suma De Retiros], Sum(BancoSanJoseco.Depositos) AS [Suma De Depositos] '+
                        'FROM BancoSanJoseco'+
                        ' WHERE BancoSanJoseco.FechaTransac = :FechaTransac'+
                        ' GROUP BY BancoSanJoseco.FechaTransac ';
    ADOQuery5.Active:= True;
    ADOQuery5.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

    ADOQuery6.Active:= False;
   ADOQuery6.SQL.Text:= 'SELECT DISTINCTROW BancoSanJosedol.FechaTransac, Sum(BancoSanJosedol.Retiros) AS [Suma De Retiros], Sum(BancoSanJosedol.Depositos) AS [Suma De Depositos] '+
                        ' FROM BancoSanJosedol'+
                        ' WHERE BancoSanJosedol.FechaTransac = :FechaTransac'+
                        ' GROUP BY BancoSanJosedol.FechaTransac ';
    ADOQuery6.Active:= True;
    ADOQuery6.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

   ADOQuery7.Active:= False;
   ADOQuery7.SQL.Text:= 'SELECT DISTINCTROW CxPDetalle.FechaPago, CxPDetalle.TipoTransac, Sum(CxPDetalle.Monto) AS [Suma De Monto] '+
                        ' FROM CxPDetalle'+
                        ' WHERE CxPDetalle.FechaPago = :FechaPago AND CxPDetalle.TipoTransac ="PA" '+
                        ' GROUP BY CxPDetalle.FechaPago, CxPDetalle.TipoTransac';
    ADOQuery7.Active:= True;
     ADOQuery7.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

      ADOQuery8.Active:= False;
   ADOQuery8.SQL.Text:= 'SELECT DISTINCTROW CxCDetalle.FechaCobro, CxCDetalle.TipoTransac, Sum(CxCDetalle.Monto) AS [Suma De Monto] '+
                        ' FROM CxCDetalle'+
                        ' WHERE CxCDetalle.FechaCobro = :FechaCobro AND CxCDetalle.TipoTransac ="PA" '+
                        ' GROUP BY CxCDetalle.FechaCobro, CxCDetalle.TipoTransac';
    ADOQuery8.Active:= True;
    ADOQuery8.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));

end;
Si no se ve bien, por favor arreglenlo.
Roman, jhonny, vtdeleon, delphi.com.ar y todos muchas gracias
Saludos
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
problema extraño con ciclo for Johnny Q OOP 4 18-11-2006 21:27:46
Problema extraño con showmodal =S Ken_Masters Varios 3 15-11-2006 01:57:11
Problema extraño en FireBird Sick boy Firebird e Interbase 4 20-10-2006 12:39:54
Problema extraño con imagen en PDF (Rave) RaulRuiz Impresión 0 12-05-2006 21:20:53
Extraño problema con Quick Report cone220 Impresión 3 13-05-2004 16:29:11


La franja horaria es GMT +2. Ahora son las 06:34:03.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi