Subject | Adding search criteria to WHERE clause and more..not working as expected. |
---|---|
Author | Adrian Wreyford |
Post date | 2007-01-13T14:48:24Z |
Well I asked a similar question a week ago, and no answer. But today I
stumbled on something I think is the answer, but cannot get ti to work.
I want to assign Search criteria to a report Query, then add a between dates
clause for Date OF Birth field to the where clause, and then run the report.
I thought the following would do, but the add items, doesn't appear to add
the item:
I put the dataset into prepare state; must be missing something here?
IBOQuery1.Prepare;
IBOQuery1.AssignSQLWithSearch(IB_Query1);
IBOQuery1.SQLWhereItems.Add('ANIMAL.ANIMALDOB BETWEEN ''' +
DateToStr(DTPBeg.Date) + ''' AND ''' + DateToStr(DTPEnd.Date) + ''' ');
IBOQuery1.Open;
The IBOQuery1.SQLWhere then only contains the assigned search criteria, and
not the line added using the SQLWhereItemsAdd, and the report has the
incorrect rows.
Any help will be appreciated.
Regards
Adrian
[Non-text portions of this message have been removed]
stumbled on something I think is the answer, but cannot get ti to work.
I want to assign Search criteria to a report Query, then add a between dates
clause for Date OF Birth field to the where clause, and then run the report.
I thought the following would do, but the add items, doesn't appear to add
the item:
I put the dataset into prepare state; must be missing something here?
IBOQuery1.Prepare;
IBOQuery1.AssignSQLWithSearch(IB_Query1);
IBOQuery1.SQLWhereItems.Add('ANIMAL.ANIMALDOB BETWEEN ''' +
DateToStr(DTPBeg.Date) + ''' AND ''' + DateToStr(DTPEnd.Date) + ''' ');
IBOQuery1.Open;
The IBOQuery1.SQLWhere then only contains the assigned search criteria, and
not the line added using the SQLWhereItemsAdd, and the report has the
incorrect rows.
Any help will be appreciated.
Regards
Adrian
[Non-text portions of this message have been removed]