Subject Re: [IBO] Passing parameters before posting a search
Author Andreas Pohl
I'm doing exactly the same and it should work. Here are my pseudo code to
accomplish that:

with IB_query1 do begin
RefreshOnParamChange:=True;
Search;
... // user hits preview
IB_Connection.BeginBusy(true);
Open;
sl:= TStringList.Create;
WriteSearch(sl);
... // retrieve user's filter conditions
IB_DataSource1.DisableInterface; // to keep working master/child
relations
frReport1.ShowReport; // call report in FastReport
IB_DataSource1.EnableInterface;
Search;
IB_Connection.EndBusy;
end;

If you are doubting that dataset is updated add a visual control (TIB_Grid)
to your form temporally and check it before calling report preparation.

HTH,

Andreas Pohl
apohl@...
www.ibp-consult.com
----- Original Message -----
From: "Jeff Clement" <jeff@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, July 23, 2001 12:38 PM
Subject: [IBO] Passing parameters before posting a search


> Hi there,
>
> I have a question which some of the more advanced IBO users
> might be able to answer for me.
>
> I have a form as a frontend to a report. The form has two edit
> boxes for a from and to dates respectively which are used to set
> the from and to date parameters in the query. I also have a search
> grid for the user to enter in additional search criteria. The query is
> on financial transactions in case you are wondering.
>
> The dataset starts of in search mode. The user enters in the from
> and to dates and any search criteria in the search grid. When they
> hit the preview or print buttons I set the from and to date
> parameters in my query and then post the search.
>
> The problem is that I keep getting a response that no records were
> found because the parameters don't seem to be updating before
> posting the search. What am I doing wrong? Should I be going
> about this task another way?
>