SAP Knowledge Base Article - Public

2909222 - How to connect to Oracle in Crystal Reports, without having to install the Oracle client?

Symptom

  • Is it possible to connect to Oracle without installing the Oracle client?
  • How to report of Oracle in Crystal Reports, without having to install and configure the Oracle client?
  • When using an Oracle Native connection, or an ODBC connection, we need to have the Oracle client installed, and configured, on the same computer as Crsystal Reports is installed. Is it possible to connect to Oracle in Crystal Reports without having to install and configure the Oracle client? 

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
       
  • Oracle 12c
  • Oracle 18c
  • Oracle 19c  

Resolution

  • To connect to Oracle without having to install and configure the Oracle Client, you can use:
    • An ODBC connection using the CR Oracle Wire Protocol ODBC driver; or
    • A JDBC connection.
             
  • Before using any of the above connection, first confirm the connection type is supported for the version of Oracle you are using, by looking at the Crystal Reports supported platform document available in the SAP Knowledge Base Article: 2859510
            
  • To create an ODBC connection using the CR Oracle Wire Protocol ODBC driver:

    1. Open the Microsoft ODBC Data Source Administrator 32bit or 64bit depending on the version of Crystal Reports used:
      • 32bit for Crystal Reports 2013, 2016
      • 64bit for Crystal Reports 2020      
         
          
    2. In Microsoft ODBC Data Source Administartor, go under the tab "Drivers", and confirm you have the following ODBC driver:
         
          CR Oracle Wire Protocol ODBC Driver
         
      If you do not have it, then you need to modify the Crystal Reports installation, and add the Data Direct ODBC driver, which will install the CR Oracle Wire Protocol ODBC Driver. For more information, see the SAP Knowledge Base Article: 1218152
         
               
    3. If you have the CR Oracle Wire Protocol ODBC driver, then select the tab "System DSN", and create an ODBC DSN using the CR Oracle Wire Protocol ODBC driver.
         
      To create the ODBC DSN, you will need the following information for your Oracle Server:
      - Host Name
      - Port Number
      - Service Name
      - User Name and Password
              
      If you need assistance, contact your Oracle Database Administrator to request this information.
         
        
    4. In Crystal Reports, create a new report, and in the "Database Expert", under "Create New Connection", double click on "ODBC", and select the ODBC DSN you just created.
          
               
  • To create a JDBC connection to Oracle:

    1. Download the Oracle JDBC driver from Oracle.

          
        
      Note: You will need an Oracle account to download the Oracle JDBC driver from the Oracle website. If you need assistance, contact your Oracle Database Administrator.
                                
    2. On the computer where Crystal Reports is installed, extract and copy the Oracle JDBC jar file in a folder like:
           
         C:\Oracle_JDBC
                      
    3. Add the path and the name of the Oracle JDBC jar file to the Classpath of the crconfig.xml file:
         
      1. 3.1 Navigate to the following folder:  

               C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java

              Note: This is the default installation folder, if you installed Crystal Reports in a custom location,
                       the start of the path will be different.
         
      2. 3.2 Open in a Text Editor the file: crconfig.xml
          
      3. 3.3 Under the section: <DataDriverCommon>, add the path and the name of the JDBC .jar file to the section: <Classpath>
                    
        <DataDriverCommon>
        <JavaDir32>C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI    4.0\win32_x86\sapjvm/bin</JavaDir32>
         <JavaDir64>C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\bin</JavaDir64>
        <Classpath><INSERT YOUR .JAR FILE PATH & NAME HERE>;C:\MS SQL Server JDBC\sqljdbc_6.0\sqljdbc42.jar</Classpath>
        <UseProxy>FALSE</UseProxy>
        <ProxyAddress></ProxyAddress>
        <ProxyPort></ProxyPort>
        </DataDriverCommon>
             
        For example:

        If the JDBC Driver .jar file for your database is: ojdbc8.jar
        and it is located in: C:\Oracle_JDBC  
        Then add the path and .jar file to the Classpath section, like:

        <DataDriverCommon>
        <JavaDir32>C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\sapjvm/bin</JavaDir32>
        <JavaDir64>C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\bin</JavaDir64>
        <Classpath>C:\Oracle_JDBC\ojdbc8.jar;C:\MS SQL Server JDBC\sqljdbc_6.0\sqljdbc42.jar</Classpath>
         <UseProxy>FALSE</UseProxy>
         <ProxyAddress></ProxyAddress>
         <ProxyPort></ProxyPort>
         </DataDriverCommon>
          
      4. 3.4 Save the change made in the crconfig.xml
                           
    4. Restart Crystal Reports, so it picks up the change.
             
    5. Create a new report, and in the "Database Expert", under "Create New Connection", double click on: JDBC (JNDI)
              
    6. In the JDBC (JNDI) window, enter the following information:
      - Connection URL: jdbc:oracle:thin:@//<server-name>:<port>/<service-name>
      - Database Classname: oracle.jdbc.OracleDriver
      - Connection Name (Optional):
        
      Example:
        
      If the Oracle server information is: 
      - Server Name : MyOracleServer.corp
      - Port Number  : 1521
      - Service Name: MyServiceName
         
      Then the information to enter will be:
      - Connection URL : jdbc:oracle:thin:@//MyOracleServer.corp:1521/MyServiceName
      - Database Classname : oracle.jdbc.OracleDriver
            
      For more detailed on how to connect via a JDBC connection, see the SAP Knowledge Base Article: 1527666 

Keywords

CR, ORA , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020