fragglemoo
IS-IT--Management
I'm a novice to Crystal Reports/SQL and I am trying to create a simple report in CR2008 that brings up the following info:
Reference Custom Field.
There are 16 records and 2 of these have an item in the custom field, but however I change the joins I can only get 2 records on the report. I’ve had various database “experts” changing the joins but nothing we do brings up all 16 records.
I have no SQL knowledge so the details below are cut and pasted from CR.
SELECT "DEFECTS"."ProjectID", "DEFECTS"."Reference", "CSTDEVTVAL"."idCustRec", "CSTDEVTVAL"."CustValue"
FROM "TTPPROJECTS"."dbo"."DEFECTS" "DEFECTS" INNER JOIN ("TTPPROJECTS"."dbo"."CSTDEVTVAL" "CSTDEVTVAL" INNER JOIN "TTPPROJECTS"."dbo"."DEFECTEVTS" "DEFECTEVTS" ON "CSTDEVTVAL"."idDefEvt"="DEFECTEVTS"."idRecord") ON ("DEFECTS"."idRecord"="DEFECTEVTS"."ParentID") AND ("DEFECTS"."ProjectID"="DEFECTEVTS"."ProjectID")
WHERE "DEFECTS"."ProjectID"=1 AND "CSTDEVTVAL"."idCustRec"=504
If anyone can help it would be appreciated and I will try and provide more info.
Reference Custom Field.
There are 16 records and 2 of these have an item in the custom field, but however I change the joins I can only get 2 records on the report. I’ve had various database “experts” changing the joins but nothing we do brings up all 16 records.
I have no SQL knowledge so the details below are cut and pasted from CR.
SELECT "DEFECTS"."ProjectID", "DEFECTS"."Reference", "CSTDEVTVAL"."idCustRec", "CSTDEVTVAL"."CustValue"
FROM "TTPPROJECTS"."dbo"."DEFECTS" "DEFECTS" INNER JOIN ("TTPPROJECTS"."dbo"."CSTDEVTVAL" "CSTDEVTVAL" INNER JOIN "TTPPROJECTS"."dbo"."DEFECTEVTS" "DEFECTEVTS" ON "CSTDEVTVAL"."idDefEvt"="DEFECTEVTS"."idRecord") ON ("DEFECTS"."idRecord"="DEFECTEVTS"."ParentID") AND ("DEFECTS"."ProjectID"="DEFECTEVTS"."ProjectID")
WHERE "DEFECTS"."ProjectID"=1 AND "CSTDEVTVAL"."idCustRec"=504
If anyone can help it would be appreciated and I will try and provide more info.