if not frmmenu.database1.InTransaction then frmmenu.database1.StartTransaction;
try
with qry1 do
begin
Active:=False;
SQL.Clear;
SQL.Text:='SELECT FECHASOLICITUD FROM TSCBAST '+
' WHERE FECHASOLICITUD >= :fec1 AND FECHASOLICITUD <= :fec2';
Params[0].value:= DateToStr(dtp1.Date);
Params[1].value:= DateToStr(dtp2.Date);
Active:=true;
frmReporteFecha:= tfrmReporteFecha.create(self);
try
frmReporteFecha.qrlbl6.Caption:=DateToStr(dtp1.Date);
frmReporteFecha.qrlbl7.Caption:=DateToStr(dtp2.Date);
frmReporteFecha.ReporteFecha.Preview;
finally
frmReporteFecha.Free;
end;