Symptom
-
Error: 'Invalid column name'
- Reports based off Salesforce fails in Crystal Reports.
- After applying a product update, report based off Salesforce.com fails in Crystal Reports with the error:
"Database Connector Error: 'HY000:[Simba][DSI](20021) Invalid column name: <column name> [Database Vendor Code: 20021 ]'"
- Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
- Salesforce.com
Reproducing the Issue
- In Crystal Reports, create a report off Salesforce.com
- Add a Command Object, and write a SOQL query to Salesforce using an Alias name for at least one column, like
SELECT "Account"."Id", "Account"."Name" as MyName
FROM "Support"."Account" "Account"
- The report refresh successfully.
- Apply the latest product update to Crystal Reports.
- When refreshing the same report in the latest product update of Crystal Reports, it fails with the error:
Database Connector Error: ‘HY000:[Simba][DSI](20021) Invalid column name: <column name> [Database Vendor Code: 20021 ]
Cause
- The Salesforce.com driver fails when the SOQL Query contains alias for database column name in the SELECT clause.
- The issue has been tracked under SAP Note 2516356
Resolution
-
The issue is currently under investgation by Development.
- As a workaround, since the issue occurs because of columns alias, edit the SOQL Query, and remove the alias name use for each column.
For example: if the SOQL query used in the Command Object is:
SELECT "Account"."Id", "Account"."Name" as MyName
FROM "Support"."Account" "Account"
Then to resolve the issue, remove the alias name in the query like:
SELECT "Account"."Id", "Account"."Name"
FROM "Support"."Account" "Account"
Keywords
CR, SForce , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed
Product
SAP Crystal Reports 2013 ; SAP Crystal Reports 2016