Subject Re: [IBO] Proper usage of AssignSQLWithSearch
Author Helen Borrie (TeamIBO)
At 10:29 AM 27-02-02 +0100, you wrote:
>Hi List
>
>I have an IB_Query (vLista) linked to a Grid and Search panel where user
>browse records and set search criteria.
>Then I have IBOQuery (vL) for QuickReport to print the contents of the grid.
>When user clicks print button I do:
>
>vL.AssignSQLWithSearch(vLista)
>vL.Open;
>
>vLista goes into dssSearch mode and vL returns all records (like search
>criteria are not set).

Make sure the search is finished and the vLista dataset is open..

[ button click? ]
...
vLista.CheckBrowseMode;
...
(* then *)
...
with vL do
begin
if Active then Close;
SQL.Clear;
InternalDataset.AssignSQLWithSearch(vLista) ;
Prepare;
Open;
end;
...
...and off you go with your report.

regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com