SAP Knowledge Base Article - Public

1294510 - How to create a report off Salesforce.com in Crystal Reports using your own SOQL query?

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:
           
    1. In Crystal Reports, under the menu "File", select "New - Blank Report"
    2. In the "Database Expert", under "Available Data Sources:" double click on "Salesforce.com"
         
       SForce - SP - 01.png    
         
          
    3. In the "Salesforce.com" window, enter the Salesforce.com user credential, and click "Finish"
         
       SForce - SP - 03 - 01.png 
         
        
    4. To write your own Salesforce.com query (SOQL), double click on "Add Command" under the Salesforce.com connection created.
          
        01- SForce - 05.png  
           
              
    5. In the "Add Command to Report" window, type your Salesforce Query (SOQL), then click "OK"
         
       01- SForce - 06.png  
         
          
    6. 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"
         
       01- SForce - 07.png
          
             
    7. 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