Hi all. My company just bought Abra Suite program that comes with Crystal Report 10 and we're testing to make some custom reports with CR. I ran into a problem when I tried to make a Beneficiary custom report.
Basically I want to show all the employees that are enrolled either in Life Insurance or 401K and their beneficiary. The problem is only the employees that are enrolled either in Life Insurance or 401K and have beneficiary that show up on the report (We use sample data and there are only 2 that have beneficiary). And that's not what I want. I know the SQL code itself is not correct in order to show what I want. So I wrote my own SQL and add the command to Abra Data Access and get this error code:
Error in select ... (-- the whole SQL statement -- ) _Execute failed with error 221: Command is missing required clause.
If this is in Microsoft Access, I will use two different queries to generate the result that I want. But I really don't know how to do it with CR. this is really frustrating.
Thanks in advance for the help
FROM hrpersnl OUTER JOIN hdepend ON hrpersnl.p_empno = hdepend.d_empno
SELECT DISTINCT hrpersnl.p_empno, hbene.b_benecode
FROM hbene INNER JOIN hrpersnl ON hbene.b_empno=hrpersnl.p_empno
WHERE hbene.b_benecode='LIFE-BW01' OR hbene.b_benecode='401K(%)'
AND hdepend.dtype = 'B'
ORDER BY hrpersnl.p_empno