не передавай параметром, а используй
т.е. вот так:
Код:
select * from Rabota where Data between (:begin) and (:end)
Код:
var
n:integer;
begin
Otchet1.Active:=false;
otchet1.Parameters.ParamByName('begin').Value:=datetostr(date1.Date);
otchet1.Parameters.ParamByName('end').Value:=datetostr(date2.Date);
otchet1.Active:=true;
n:=combobox1.ItemIndex;
case n of
0: otchet1.Sort:='data';
1: otchet1.Sort:='rasxod';
2: otchet1.Sort:='prodaja';
3: otchet1.Sort:='pribol';
4: otchet1.Sort:='vipolneno';
end;
end;