Ver Mensaje Individual
  #8  
Antiguo 20-01-2009
brandolin brandolin is offline
Miembro
 
Registrado: jul 2003
Ubicación: Mendoza
Posts: 324
Reputación: 21
brandolin Va por buen camino
yo normalmente hago lo siguiente...
Código Delphi [-]
try
         FReporte:=TFReporte.Create(self);
         FReporte.QryReporte1.SQL.Add('SELECT FECHA, NOMBRE, MEDICO, PRIMERAVEZ, PARTICULAR, ASEGURADORA ');
         FReporte.QryReporte1.SQL.Add('FROM PACIENTES ');
         FReporte.QryReporte1.SQL.Add(format('WHERE  FECHA >= ''%s'' AND  FECHA <= ''%s'' ORDER BY FECHA', [DateToStr(DTP1.Date), DateToStr(DTP2.Date)]));
         FReporte.QryReporte1.Open;
         ShortDateFormat := 'mm/dd/yyyy';
         //QRPlaGen.Titulo.text := 'Hojas de Pago de Planillas';
         FReporte.RVP1.ExecuteReport(ReporteF1);
      finally
         FReporte.RVP1.Destroy;
      end;

solo introduzco la funcion format y me da mas claridad en la sentencia...
Responder Con Cita