I have a problem getting a report to return the correct results in Crystal Reports 8.5 when using DISTINCT.
I have set up the report to access the required tables and the SELECT...FROM... statement is correct.
For example:
SELECT DISTINCT A.1, B.2
FROM A LEFT OUTER JOIN B ON A.1 = B.1
However, when I use the Select Expert to add criteria to the where clause, i.e. WHERE B.5 = 42, Crystal automatically adds this field into the SELECT statement.
For example:
SELECT DISTINCT A.1, B.2, B.5
FROM A LEFT OUTER JOIN B ON A.1 = B.1
I don't want this value returned as it prevents the DISTINCT from working correctly. Is there a way of removing it, stopping it being added, or another solution?
Thanks in advance.