This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes Crystal Reports and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Crystal Reports and Java" Watch "Crystal Reports and Java" New topic

Crystal Reports and Java


Joined: Nov 11, 2003
Posts: 1
I am looking for documentation of how to integrate crystal reports with Java. Can anyone help me regarding this. I am developing an application using jdk, swing, oracle database..
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

The short answer: You can't.
The long answer: You can, but it's a pain, and I would suggest trying to write reports in Jasper Reports or some other Java-based reporting tool.
If you (or your boss) insist on Crystal, you will need to write C functions accessing Crystal's C API and then wrapping that in a JNI shell. This is not an easy task. Oh, and the CRPE API is no longer supported -- use the newer API -- although the newer API may not work for desktop-based applications.
Crystal does have a Java API, but that's only if you use their Crystal Reports Server in a distributed environment. You can't use it with Java in Swing apps.
IN short, Crystal seems to be pusing its reports as web-based reports instead of desktop-based reports. Support for the desktop-reporting is dwindling at Crystal. Unless your reports are already written, I urrge you to look at other reporting solutions. And even if they are already written, it may be easier to re-write them rather than trying to integrate Crystal. (I had Crystal integraed, but then it broke for some reason Instead of fixing it, I switched to Jasper reports....)

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I agree. Here's the link:
subject: Crystal Reports and Java
It's not a secret anymore!