Subquery parameters

A subquery or set of subqueries contains the following parameters:

Parameter

Description

Filter Object(s)

The object whose values are used to filter the result objects.

You can include more than one Filter Object. If you do, Crystal Reports concatenates the values of the objects you specify.

Filter By Object(s)

The object that determines which Filter Object values the subquery returns.

You can include more than one Filter By object. If you do, Crystal Reports concatenates the values of the objects you specify.

Operator

The operator that specifies the relationship between the Filter object and the Filter By object.

Because of database restrictions you cannot use certain combinations of operators and Filter By objects together. For example, if you use the Equal To operator with a Filter By object that returns multiple values, the database rejects the SQL because this type of subquery requires the Filter By object to return one value only.

In cases where the generated SQL is rejected by the database, you see an error message showing the error description returned by the database.

WHERE condition (optional)

An additional condition that constrains the list of values of the Filter By object. You can use ordinary report objects, predefined conditions or existing query filters (including subqueries) in the WHERE condition.

Relationship operator

If there is more than one subquery, determines the relationship between the subqueries.

AND - the conditions in all of the subqueries must be satisfied.

OR - the conditions in any one of the subqueries must be satisfied.