Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Changing Data Source to JDBC (JNDI)

Our customer has a Domino application that connects to CR to generate reports using a SQL back end. We are in the process of rewriting the Domino agent from LotusScript to Java. The .rpt file currently uses an ODBC datasource connection. We need to change that to a JNDI datasource connection since the new Java agent is using JRC to connect to CR.

I tried to create a new JDBC (JNDI) data source connection but get the following error:

Some tables could not be replaced, as no match was found in the new data source. Please specify the table required for any unmodified tables.

Can someone provide the steps needed to make this work? Do I need to install a jdbc driver on the server? I know that from Domino Java code, I can do the following and connect to the database successfully:

Connection conn = null;

Properties props = new Properties();

props.put("user", SQL_DSN_Login);

props.put("password", SQL_DSN_Pass);

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

conn = DriverManager.getConnection("jdbc:odbc:" + SQL_DSN, props);

Where SQL_DSN is an ODBC system DSN defined on the server, SQL_DSN_Login is the username & SQL_DSN_Pass is the password for that user.

Any assistance is greatly appreciated!

Tags:
Former Member
Former Member replied

Hi James,

Installation of jdbc driver

1. Download a supported 32 bit JDBC connector from the vendor website and install it to the default path.
2. Edit the CRConfig.xml file from the Crystal reports installation target path.
3. Edit the <Classpath> tag  to add the location of the jar file before existing entries.

4. Save the file and restart Crystal Report application.

    • Path to CRConfig.xml for CR2008: C:\Program Files (x86)\Business Objects\Common\4.0\java\
    • Path to CRConfig.xml for CR2011, CR2013: C:\Program Files (x86)\SAP BusinessObjects\\SAP BusinessObjects Enterprise XI 4.0\java\

Configure JDBC connection in Crystal Reports

1. From Crystal Reports, create a new report (File>New>Blank Report)
2. In Database Expert window click on “Create New Connection”
3. Locate “JDBC” and click on “Make New Connection”.
4. In the connection wizard screens complete the following information

    • Connection URL: example: select the connection URL from the table below (example: jdbc:oracle:thin:@myservername:1521:myservice)
    • Database Classname: select the classname from the table belov (example: oracle.jdbc.driver.OracleDriver)


        5. Click Next and provide your credentials as logon username and password

More information: JDBC Connectivity for SAP Crystal Reports

"We need to change that to a JNDI datasource connection since the new Java agent is using JRC to connect to CR."


Please look this official video:
Change the data source location: Crystal Reports 2011 - YouTube

I hope this information helps to resolve your problem.

Regards,
István

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question