Symptom
- How to configure a JDBC connection to HANA?
- How to create a JDBC connection to HANA database in Crystal Reports?
- When attempting to connect to HANA via a JDBC connection in Crystal Reports, it fails with the error: "Driver not found"
- 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
- SAP HANA datasource
- SAP HANA client
Resolution
- To connect to HANA via a JDBC connection in Crystal Reports, perform the following steps on the computer where Crystal Reports is installed:
- Download and Install the 32 bit HANA client with the JDBC component
To download the SAP HANA Client go to the SAP Software Download Center, and under the tab "SUPPORT PACKAGES & PATCHES", select the following: - By Category
- SAP IN-MEMORY (SAP HANA )
- HANA PLATFORM EDITION
- SAP HANA PLATFORM EDITION
- SAP HANA PLATFORM EDITION 2.0
- SAP HANA CLIENT 2.0
- In the SAP HANA CLIENT 2.0 download page, in the operating system drop-down list, select: "WINDOWS SERVER ON IA32 32BIT"
- Locate the HANA JDBC driver: ngdbc.jar
By default, it is located at: C:\Program Files (x86)\SAP\hdbclient\ngdbc.jar
- Add the HANA JDBC driver path, to the "<Classpath>" parameter of the Crystal Reports configuration file: crconfig.xml
By default the file: crconfig.xml, is located at:
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java
And the line to update looks like:
<Classpath>C:\Program Files (x86)\SAP\hdbclient\ngdbc.jar;...
- Save the change made in the file: crconfig.xml
- Restart Crystal Reports, so it picks up the change.
- Create a new report, and in the "Database Expert" double click on: JDBC (JNDI)
- In the JDBC (JNDI) window, enter the following information:
- Connection URL : jdbc:sap://<HANA SERVER>:<PORT NUMBER>
- Database Classname : com.sap.db.jdbc.Driver
Notes:
- Add your <HANA SERVER> and <PORT NUMBER> in the Connection URL. If you do not have this information, contact your HANA Database Administrator.
- Also note the port number works as follow: 3 + <HANA Instance number > + 15
For example, the port number: 30015 means: 3 + HANA Instance number: 00 + 15
If the instance number is: 02, then the port number would be 30215
Keywords
Java, HANA, CR, connection , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports 2013 ; SAP Crystal Reports 2016