Kbase P146236: SQL: Error 7481 linking two tables in a Crystal Reports report
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/19/2009 |
|
Status: Unverified
SYMPTOM(s):
SQL: Error 7481 linking two tables in a Crystal Reports report
Inconsistent Types 7481
Crystal Reports issues the error: Failed to retrieve data from the database
Crystal Reports issues the error:
Failed to retrieve data from the database
HY000:[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Inconsistent Types 7481)[Database Vendor Code: -20009]
The developer is attempting to link two CHARACTER fields one of which is an ARRAY field (a CHARACTER field with EXTENT > 0 ) and the other is not
The failed SQL query generated by Crystal Reports looks like the following:
SELECT "Customer1"."CustNum", "Customer1"."Name", "myCust1"."mycustnum", "myCust1"."myname"
FROM {oj "SPORTS2000"."PUB"."Customer" "Customer1"
RIGHT OUTER JOIN "SPORTS2000"."PUB"."myCust" "myCust1"
ON "Customer1"."Name"="myCust1"."myname"}
Where Name is a CHARACTER field with EXTENT = 0 and myname is a CHARACTER field with EXTENT = 3.
FACT(s) (Environment):
Windows
OpenEdge 10.x
Crystal Reports 11 (XI)
CAUSE:
Crystal Reports does not allow the linking of two tables when one field is an array. The Crystal Reports online documentation states: " The fields used to link two tables must have the same data type".
FIX:
Ensure that neither of the fields linking the two tables is an ARRAY or write your own free form query that specifies specific elements of the ARRAY field as desired and use the Crystal Reports Command Object to create your report referencing specific elements of the array field.