cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect to a Derby database with JRC?

Former Member
0 Kudos

I have a report that I want to display using JRC on a Linux box.

The problem I have is getting it to connect to is a Derby database. I have a CRConfig.xml set up on Windows, which I use to access the Derby database from Crystal reports and I can copy the relevant bits to the linux box. what isn't clear from any documentation or samples I can find is how to set up the bits that Crystal Reports asks for after you've set up CRConfig.xml, i.e. server, user name, password and anything else I've forgotten. Is this documented anywhere?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I found that I could get it to talk to the local database by incorporating a modified version of the JRCChangeDatabaseConnection sample code.

It's nice to get it working, but there's been too much guesswork involved. I'm not sure which properties I really needed to change, what the connection string format is, etc. As it worked first time, I obviously guessed well, but this really should be documented somewhere and the samples should refer to that documentation, so I can find the information and I don't have to guess.

Former Member
0 Kudos

It's working with one report, but another report crashes out with

"com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: JDBC Error: A NULL value cannot be passed to a method which takes a parameter of primitive type 'int'.---- Error code:-2147467259 Error code name:failed"

The line that throws the exception is:

databaseController.setTableLocation(table, tables.getTable(i));

It's not at all obvious to me why that should fail. My best guess is that the second report has a couple of parameter fields and they need to be detected and handled differently in some way?