Subject Re: [IBO] Re: Filter Problems
Author Helen Borrie
At 12:19 AM 11/02/2005 +0000, you wrote:


>Let me expound on how this is useful and what it would be similar to
>in SQL
>
>it would be like writing the following
>
>SELECT Count(*), PRODUCT_CODE, SUM(BALANCE) BAL FROM ACCOUNTS GROUP
>BY PRODUCT_CODE HAVING Count(*) > 10
>
>How this is useful is that you really only want to see the sum of
>the balance for products that have a count over 10.
>
>Now I COULD go in and dynamically rewrite the SQL statement.
>However this is a bit inefficient when I can query all of the
>records and then just filter the results on the screen.
>
>Now if applying a filter on TIBOQuery causes the dataset to be
>requiried then I may as well just dynamically write the SQL
>statement.
>
>But I would hope that the Filter would work to reduce the records I
>am getting back.

It's not valid for a filter. Filtering is done on the basic of the search
criteria (i.e. the WHERE clause). not the grouping criteria.

The only way you could wangle a filter like this would be to put the query
into a view, with the count as a legal column name, then filter the view on
that column.

Helen