Symptom
- How to use your own Salesforce.com query in Crystal Reports?
- Can we use Salesforce Object Query Language (SOQL) to write your own query to Salesforce.com in Crystal Reports?
- 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 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
- Salesforce.com
Resolution
- When reporting off Salesforce.com in Crystal Reports, it is possible to use your own query written in Salesforce Object Query Language (SOQL), by using a Command Object:
- In Crystal Reports, under the menu "File", select "New - Blank Report"
- In the "Database Expert", under "Available Data Sources:" double click on "Salesforce.com"
- In the "Salesforce.com" window, enter the Salesforce.com user credential, and click "Finish"
- To write your own Salesforce.com query (SOQL), double click on "Add Command" under the Salesforce.com connection created.
- In the "Add Command to Report" window, type your Salesforce Query (SOQL), then click "OK"
- Back to the previous window, notice under "Selected Tables", the object "Command" as been added.
This command, is the Salesforce Query you just entered. To continue click "OK" or "Finish"
- In the "Design" view of the report, add the desired database fields.
You are now reporting off a Salesforce Query in Crystal Reports.
- Notes:
- For information on how to write a Salesforce Query (SOQL), see the following link on Salesforce.com website: Salesforce Object Query Language
- For questions or issues using SOQL, contact Salesforce.com Support, or search the Salesforce.com website.
Keywords
CR, SForce, Add Command, SFDC, salesforce.com , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016