procedure TfrmTest.BtnAdmClick(Sender: TObject);
begin
qrFondos.close;
qrFondos.SQL.clear;
if (CutBox.checked=false) then begin
qrFondos.sql.add('select * from Ofrendas');
qrFondos.sql.add('where fecha between '+#39+DatetoStr(Cutfecha1.date)+#39+' and '+#39+DatetoStr(Cutfecha2.date)+#39);
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;
Form1.cutfecha3.Caption := Cutfecha1.date;
Form1.cutfecha4.Caption := 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;
Form1.cutfecha3.Caption := Cutfecha1.date;
Form1.cutfecha4.Caption := Cutfecha2.date;
end;
begin
QrAdm.preview;
end;
end;
end.