Hola comunidad soy nuevo en este foro, he visto que son los maestros del delphi, justamente tengo un problema por el que estoy atravesando por el cual pedirles ayuda no podia dudar de eso.
estoy realizando un reporte que debe imprimirme el intervalo entre la fecha_inicio y la fecha_final, por ejemplo : fecha_inicio = 05/12/2006 ; fecha_final=10/12/2006 entonces el reporte me imprime lo siguiente:
05/12/2006
06/12/2006
07/12/2006
08/12/2006
09/12/2006
10/12/2006
esto me sirve para consultar a la base de datos con la fecha específica para mi reporte del personal que ha registrado su asistencia.
Código Delphi
[-]
if ( StrToDate(fecha_inicio)>StrToDate(fecha_final) ) then
begin
ShowMessage('La fecha desde '+fecha_inicio+' es mayor a la fecha final '+fecha_final);
end
else
begin
while ( f_desde. Date < StrToDate ( fecha_final ) ) do
begin
RFechafecha.Parameters.ParamByName('fechas').Value:=DateToStr(f_desde.Date);
RFechafecha.Parameters.ParamByName('codigobarra').Value:=codigobarra;
RFechafecha.Close;
RFechafecha.Open;
while not RFechafecha.Eof do
begin
Edit1.Text:=RFechafechacodigo_barra.AsString;
Edit3.Text:=RFechafechanumero_contrato.AsString;
Edit4.Text:=RFechafechanombre_contrato.AsString;
Edit7.Text:=RFechafechanombre_temporada.AsString;
Edit8.Text:=RFechafechafecha_inicio.AsString;
Edit9.Text:=RFechafechafecha_fin.AsString;
Edit10.Text:=RFechafecharegistrada.AsString;
RFechafecha.Next;
end;
f_desde.Date:=f_desde.Date+1;
end;
end;
end;
Edit1,Edit2,Edit3,Edit4,Edit5,Edit6,Edit7,Edit8,Edit9,Edit10 están dentro de un TQRSubdetail
RFechafecha es un ADOQuery > dentro el cual está la consulta.
el problema es que el reporte solo me imprime la ultima fecha y se acaba, mi preocupaciones que como imprimo todas las fechas del intérvalo.
Gracias por leer este mensaje.