I have been creating Crystal Reports for probably 14 years. I've written them against different versions of Access and SQL Server. Only now did I run into something that I have never seen before. There was extra data showing up in my report that made no sense to me. I would query the database and not come up with the same dataset that crystal reports was. The solution to the problem was to modify the links and to Enforce Join (Both). For some reason after enforcing the join I got the dataset I was looking for. Then I found that Enforcing the Join is not the default, so know I wonder why I haven't run into this before, and how many other reports I have out there that are returning incorrect data. I am using Crystal XI on SQL Server 2008. Maybe this combination is the problem? Let me explain further.
The report in question links the Case to a lookup table for the cases status and also to a lookup table for the user assigned to the case. The report groups by User and then by Case Status. Notice both groups are in the linked tables. The problem is that when I open one of the cases of a particular case status (grouped) I find that the cases status is something entirely different. But after enforcing the join, everthing seemed to be grouped correctly.
I always thought enforcing the join would pull the tables data even if not being used, I did not think that failing to enforce the data would bring back incorrect data. Can anyone explain this?
The report in question links the Case to a lookup table for the cases status and also to a lookup table for the user assigned to the case. The report groups by User and then by Case Status. Notice both groups are in the linked tables. The problem is that when I open one of the cases of a particular case status (grouped) I find that the cases status is something entirely different. But after enforcing the join, everthing seemed to be grouped correctly.
I always thought enforcing the join would pull the tables data even if not being used, I did not think that failing to enforce the data would bring back incorrect data. Can anyone explain this?