I am a new user to Crystal. I am using version Crystal XI. I am trying to recreate an Access Report into Crystal. Below is the code from both reports. My Access report correctly pulls in the province (ALADDS) based on the address number (AN8), in Crystal it seems like my join isn't working correctly and it pulls in more lines of data. My Access Report pulls in 1775 lines. If I don't use anything from table F0116 in Crystal I also get 1775 lines. As soon as I add the ALADDS field I get 2282 lines. I have played with the various settings on the join, and if I do an Inner Join I get 2280 lines. I'm not sure what I am missing.
CRYSTAL
SELECT "F0911"."GLKCO", "F0911"."GLMCU", "F0911"."GLOBJ",
"F0911"."GLDCT", "F0911"."GLDOC", "F0911"."GLAA", "F0911"."GLDGJ",
"F0116"."ALADDS", "F0116"."ALAN8", "F0911"."GLAN8"
FROM "JDE_EPD_REP"."CPRODDTA"."F0911" "F0911" LEFT OUTER JOIN
"JDE_EPD_REP"."CPRODDTA"."F0116" "F0116" ON "F0911"."GLAN8"="F0116"."ALAN8"
WHERE ("F0911"."GLDGJ">=109091 AND "F0911"."GLDGJ"<=109120) AND
"F0911"."GLOBJ"=N'50003' AND ("F0911"."GLKCO"=N'00000' OR
"F0911"."GLKCO"=N'10361')
ORDER BY "F0116"."ALADDS"
Access:
SELECT DISTINCT CPRODDTA_F0911.GLOBJ, CPRODDTA_F0911.GLDGJ,
CPRODDTA_F0911.GLKCO, CPRODDTA_F0911.GLMCU, CPRODDTA_F0911.GLDCT,
CPRODDTA_F0911.GLDOC, CPRODDTA_F0116.ALAN8, CPRODDTA_F0911.GLAN8,
CPRODDTA_F0116.ALADDS, CPRODDTA_F0911.GLAA
FROM CPRODDTA_F0911 LEFT JOIN CPRODDTA_F0116 ON CPRODDTA_F0911.GLAN8 =
CPRODDTA_F0116.ALAN8
WHERE (((CPRODDTA_F0911.GLOBJ)="50003") AND ((CPRODDTA_F0911.GLDGJ)
Between 109091 And 109120) AND ((CPRODDTA_F0911.GLKCO)="10361" Or
(CPRODDTA_F0911.GLKCO)="00000"))
ORDER BY CPRODDTA_F0116.ALADDS;
CRYSTAL
SELECT "F0911"."GLKCO", "F0911"."GLMCU", "F0911"."GLOBJ",
"F0911"."GLDCT", "F0911"."GLDOC", "F0911"."GLAA", "F0911"."GLDGJ",
"F0116"."ALADDS", "F0116"."ALAN8", "F0911"."GLAN8"
FROM "JDE_EPD_REP"."CPRODDTA"."F0911" "F0911" LEFT OUTER JOIN
"JDE_EPD_REP"."CPRODDTA"."F0116" "F0116" ON "F0911"."GLAN8"="F0116"."ALAN8"
WHERE ("F0911"."GLDGJ">=109091 AND "F0911"."GLDGJ"<=109120) AND
"F0911"."GLOBJ"=N'50003' AND ("F0911"."GLKCO"=N'00000' OR
"F0911"."GLKCO"=N'10361')
ORDER BY "F0116"."ALADDS"
Access:
SELECT DISTINCT CPRODDTA_F0911.GLOBJ, CPRODDTA_F0911.GLDGJ,
CPRODDTA_F0911.GLKCO, CPRODDTA_F0911.GLMCU, CPRODDTA_F0911.GLDCT,
CPRODDTA_F0911.GLDOC, CPRODDTA_F0116.ALAN8, CPRODDTA_F0911.GLAN8,
CPRODDTA_F0116.ALADDS, CPRODDTA_F0911.GLAA
FROM CPRODDTA_F0911 LEFT JOIN CPRODDTA_F0116 ON CPRODDTA_F0911.GLAN8 =
CPRODDTA_F0116.ALAN8
WHERE (((CPRODDTA_F0911.GLOBJ)="50003") AND ((CPRODDTA_F0911.GLDGJ)
Between 109091 And 109120) AND ((CPRODDTA_F0911.GLKCO)="10361" Or
(CPRODDTA_F0911.GLKCO)="00000"))
ORDER BY CPRODDTA_F0116.ALADDS;