Hi Norbert
Note that in the KBA I referenced it says:
- Using a SELECT statement in a SQL Expression field is not supported. Generally, an SQL Expression field cannot contain a SELECT statement because Crystal Reports can only process one SELECT statement per main report. If a SELECT statement is included in an SQL Expression field, an error message, similar to the following, may appear:
I'd suggest creating a stored proc for this. Offloading the processing on to the server will always result in better performance.
- Ludek