cancel
Showing results for 
Search instead for 
Did you mean: 

why opening from java the rpt search for a JNDI when it's setup for a DNS ?

Former Member
0 Kudos

I downloaded CR for eclipse 2.

All is 'quite' working froma a java app.

i've only a problem with an 'jndi name search error'. I'll try to explain.

In the RPT i use a DSN connection to a sql server into a differente machine. When I open directly the rpt, all is working.

From java code, i'll open the report, but when i try to export to pdf iit tell me about an error 'jndi name search error', with the name of the DSN connection i setup.

Why? Why opening rpt all is working, but opening from code NOT is working ?

What's the difference from two opening methods? Why an .rpt opened from java cannot just open the connection like when opened from cristal report !?

*My question is: why opening from java the rpt search for a JNDI when it's setup for a DNS connection ?! *

Accepted Solutions (1)

Accepted Solutions (1)

Adam_Stone
Active Contributor
0 Kudos

My guess is that you are designing this in the full designer, not the one within eclipse. CR4E only supports java based connections, so it is looking for the JDBC/JNDI name and won't look at the DSN's.

Former Member
0 Kudos

The .rpt has been originally created from an ancient version of Cristal report. probably the '8'.

In an italian software called 'Business', the .rpt is populated for printing of invoices and similar docs.

My society is trying to 'integrate' our software with the .rpt used from our customer.

So we want simply open .rpt, add a new logo, set the selection for record and save as pdf.

We so bought Cristal report 2008 (v.12 ), opened the .rpt, saved (so it 's now in a supported version).

The sql server is located at 10.1.2.40, and is a Microsoft Sql Server.

In my development pc I've installed Cr 12. I added a User DSN to point to Sql server at 10.1.2.40, at right DB with username and password. Opening from my development machine the .rpt and 'running' it, it display the data. Ok !

I downloaded CR4 Eclipse 2.

I open report using the unmanaged sdk. (to access it through file system, not via RAS), Ok.

I set selection record. Ok.

I execute .export with 'PDF' for format option and here I get an exception: the JNDI name 'CPR' is not found. Where CPR is the DSN name setup into .rpt from Cristal Report 2008.

So, no, i'm not trying to using the designer from Eclipse, but from the full application. But I must use the rpt at runtime to export some rendered records.

What must I do to do this?

CR4E only supports java based connections, so it is looking for the JDBC/JNDI name and won't look at the DSN's.

How Can i setup at runtime a JDBC / JNDI connection ?

I already have a 'connection' from my code to the sql server, using sqlserver jdbc driver v. 4 from microsoft. And executing query I see the results. So i have right driver, ip, db name, user name and password

But is there a way to simply tell at runtime to my .rpt to use THIS connection? Or a similar connection...

Thanks in advance for help provided to us. (we bought a CR license only for this work...)

Former Member
0 Kudos

i'm looking for another way:

If I copy sql server jdbc driver into Common lib of Cristal Report and so modifiy the default connection for .rpt into the full designer, is it enoough to avoid this problem?

Or must I have CR installed even into destination pc ? (and so buy another license... ?)

Please help me, because my work on this project is stopped, untile I'll understand how to simply export a selection of record....

;(

Adam_Stone
Active Contributor
0 Kudos

The important thing is to design the report based on java connectivity and make sure that that connectivity is available at runtime.

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry, but I've not understand what you mean.

What must I do to design report with jdbc at runtime... ?