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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
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
Asi:
Código Delphi [-]
ShortDateFormat := 'dd/mm/yyyy';
   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));
Me funciono en este primero.
Curioso me ve el dia 2, no el dia 1
Saludos
Responder Con Cita
  #2  
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
Tanto la opcion de jhonny como la de vtdeleon funcionan solo hay que cambiar una pequeña cosa, aun asi sigue con el problema, no ve el 1,
ve el 2, y del 28 para atras, es extraño.
saludos
Responder Con Cita
  #3  
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
Opcion jhonny:
Código Delphi [-]
ADOQuery1.Parameters[0].Value:= StrToDate(DateToStr(DTP1.Date));
Opcion vtdeleon:
Código Delphi [-]
ADOQuery1.Parameters.ParamByName('fecha').value := StrToDate(DateToStr(DTP1.Date)); 
    ADOQuery1.Parameters.ParamByName('fecha').DataType:=ftDate ;
La dos funcionan igual.
Muchas gracias por estar ayudandome.
Saludos
Responder Con Cita
  #4  
Antiguo 02-03-2007
Avatar de vtdeleon
vtdeleon vtdeleon is offline
Miembro
 
Registrado: abr 2004
Ubicación: RD & USA
Posts: 3.236
Poder: 26
vtdeleon Va por buen camino
StrToDate(DateToStr(DTP1.Date))
No creo que sea necesario hacer todas esas conversiones, con solo poner DTP1.date, debería bastar.
__________________
Van Troi De León
(Not) Guía, Code vB:=Delphi-SQL, ¿Cómo?
Viajar en el tiempo no es teóricamente posible, pues si lo fuera, ya estarían aqui contándonos al respecto!
Responder Con Cita
  #5  
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 vtdeleon
Gracias por estar ayudandome;
No vasta, me da un error dice que no coinciden los tipos, si pongo todo eso si funciona bien.
Saludos
Responder Con Cita
  #6  
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
Muchisimas Gracias a todos, ya lo solucione, con la opcion de jhonny modificada, ya me da todos los datos.
Nota: La opcion de vtdeleon funciona a la perfecion tambien.
Sois unos verdaderos Maestros.
Muchas Gracias de nuevo y que paseis un buen fin de semana.
Saludos
Responder Con Cita
  #7  
Antiguo 02-03-2007
Avatar de jhonny
jhonny jhonny is offline
Jhonny Suárez
 
Registrado: may 2003
Ubicación: Colombia
Posts: 7.070
Poder: 32
jhonny Va camino a la famajhonny Va camino a la fama
Me alegra que todo vaya bien , Pero me da curiosidad y seria bueno que nos mostraras cómo quedo finalmente la cosa .
__________________
Lecciones de mi Madre. Tema: modificación del comportamiento, "Pará de actuar como tu padre!"

http://www.purodelphi.com/
http://www.nosolodelphi.com/
Responder Con Cita
  #8  
Antiguo 02-03-2007
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Yo también quiero verlo. La verdad es que la opción de Van Troi fue lo que intenté pero intercambiando el orden: primero el DataType y luego la sustitución, y simplemente no me encuentra ningún registro.

// Saludos
Responder Con Cita
  #9  
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
Respuesta


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 22:08:34.


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