Hi every one,
My problem is as follows I,m using delphi 5 and un a form I have two
DateTimePickers 1 checkbox 1 RadioGroup and 1 botton this is the code I'm using which compiles but when I set the to dates and click the botton the follow message apears Project ProJect1. exe Raised exception class EListError with message List Index out of Bound(0) heres the code:
qrFondos.close;
qrFondos.SQL.clear;
QrFondos.Params.Add;
QrFondos.Params.Free;
QrFondos.Params[0].Name := 'FDesde';
QrFondos.Params[0].ParamType:=ptInput;
if (CutBox.checked=false) then begin
QrFondos.SQL.Add('Select from* ofrendas Where Fecha Between : fDesde and FHasta order by Codigo');
Qrfondos.ParamByName('FDesde').AsDate := CutFecha1.Date;
QrFondos.ParamByName('FHasta').ASDate := CutFecha2.Date;
Case CutStatus.ItemIndex of
0:qrFondos.sql.add('and Tipo_Recibo ='+#39+'I'+#39);
1:qrFondos.sql.add('and Tipo_Recibo ='+#39+'R'+#39);
end;
qrFondos.open;
QrAdm.cutfecha3.Caption := DatetoStr(cutfecha1.date);
QrAdm.cutfecha4.Caption := DateToStr(CutFecha2.Date);
end;
if (CutBox.checked=true) then begin
qrFondos.sql.add('select * from Ofrendas');
Case CutStatus.ItemIndex of
0:qrFondos.sql.add('where Tipo_Recibo ='+#39+'I'+#39);
1:qrFondos.sql.add('where Tipo_Recibo ='+#39+'R'+#39);
end;
qrFondos.open;
QrAdm.cutfecha3.Caption := DatetoStr(cutfecha1.date);
QrAdm.cutfecha4.Caption := DatetoStr(cutfecha2.date);
end;
begin
QrAdm.preview;
end;
end;
please help I'v tried almost everything thanks!!!!!!!!!!!!!