on 08-22-2014 7:42 PM
Hello all,
I have been trying for some time now to open a Crystal Report using Java. However, every time I try, it always fails at "reportClientDoc.open(REPORT_NAME, 0);" with varying errors. Every time I figure out how to get rid of one error, another occurs at that same line. The one that I am stuck on now is "com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com/crystaldecisions/common/keycode/KeycodeException---- Error code:-2147467259 Error code name:failed." I think that this one may have to do with the fact that I just temporarily upgraded to the free trial of Crystal Reports 2013 to see if perhaps part of the problem was that Crystal Reports 2008 was too old for my JDK. I have spent a lot of time searching the internet and trying different things in Eclipse to get rid of this error and haven't had any luck. Does anyone have any idea what could be causing it? I would greatly appreciate any help.
Thank you!
Maria
I think that now the problem lies in the fact that I cannot figure out how to convert my Java web project into a Crystal Reports web project. Should this be possible? I've tried to do this in multiple ways and haven't had any luck. I'm assuming that accomplishing this will be at least a step in the right direction, if not the solution, because when I created a regular Java project and tried to convert a Crystal report with that, it wouldn't work, but when I created a Crystal Reports project and did the same, it did work.
Any help would be greatly appreciated!
-Maria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unlike earlier versions of Crystal, Crystal 2013 (and 2011) don't include the SDK on installation. Are you opening the report from a Crystal Reports Server or BusinessObjects system? If so, which version? Or are you opening a report from a file using just the Crystal SDK?
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your reply, Dell. I'm sorry that it has taken me so long to get back to you - I was given some assignments that took precedence over this one. For now I am simply trying to open a report file using the SDK. I didn't realize that Crystal 2013 doesn't include the SDK, so I just installed that, and now I get an error message that reads "java.lang.NoClassDefFoundError : com/businessobjects/foundation/logging/LoggerManager." I have tried importing the jar files from Crystal 2013 as well as those that came with the SDK. I've seen other people get this error and resolve it by adding the logging.jar file, but that doesn't seem to be solving the problem for me. Is there something that I am missing?
Thank you!
-Maria
Are the crystal reports managed or unmanaged?
Are you opening the crystal reports from crystal/BusinessObjects Enterprise server?
Or the reports are on disk and you are using the crystal reports for eclipse sdks to open the reports?
A little more background can help us give better suggestions.
Thanks,
Prithvi
Hello Prithvi,
The reports are unmanaged - I am simply trying to open them from my desktop for now. I'm sorry for the lack of information - I've never worked with Crystal before, so I'm not sure what information is relevant and useful. If there is any other information that you would find helpful, please let me know.
Thank you!
-Maria
Thanks for the information.
Foe running unmanaged reports you would need to download the crystal reports for ecllipse libraries from the below location
http://scn.sap.com/docs/DOC-29757
Direct Download link
http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/crjava-runtime_12.2.218.zip
Viewing sample availbale at
http://scn.sap.com/docs/DOC-6898
Download the sample from above location and create a web application archive(.WAR) ulitilizing the jar files found in the lib folder from the above download location. Include all the jars in your application context. You would need to include the crystalreportsviewer folder as well if you want to view your report in the viewer.
Thanks,
Prithvi
Hi Maria,
Below is the samples page link. You would be able to find few samples relavent to your implementation.
You do have a sample to export a report to pdf.
Thanks,
Prithvi
Thank you, Prithvi, but unfortunately, the code in that example is in a JSP file. I'm looking for a way to do it with Java. My code right now is pretty much identical to an example that I found here:
https://community.oracle.com/thread/2084921
I've seen this same code multiple other places as well, so I'm assuming that it is correct, but it is throwing that java.lang.NoClassDefFoundError that I mentioned above, and I can't figure out why. I've added the logging.jar file. Is there anything else that could be causing this?
Thanks,
Maria
I just tried cleaning my project, and that took care of the NoClassDefFoundError. Now it is again erroring out on the line where I try to open the ReportClientDocument, with the following error:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.crystaldecisions.jakarta.rpoifs.RandomAccessPOIFileSystem.B()Lcom/crystaldecisions/jakarta/poi/poifs/filesystem/DirectoryEntry;---- Error code:-2147467259 Error code name:failed
further in the stack trace it says "Caused by: java.lang.NoSuchMethodError: com.crystaldecisions.jakarta.rpoifs.RandomAccessPOIFileSystem.B()Lcom/crystaldecisions/jakarta/poi/poifs/filesystem/DirectoryEntry;"
Can you please build a new project with your java code with only the libraries suggested earlier in the classpath of the application.
It looks like a jar conflicting issue. Please make sure you isolate your application from any old jars and use the latest jars and let us know the behaviour.
Thanks,
Prithvi
Hi Prithvi,
I built the new project, and it works there, which is really exciting. So the problem could lie in conflicting jar files. However, through the process of getting it to work in the new project, I also realized that the project that I was originally using was not using the Crystal Reports Java Project Runtime Library, or rather it was, but only as individually added jar files instead of the library itself. Would that make a difference? I tried to add the library, but Eclipse says that "The Crystal Reports Java Project Runtime Library cannot be added to a web project." I tried following the steps "To add Crystal Reports functionality to a Java, web, or plug-in project from the Project Explorer" from the developer guide, but when I tried, it failed with the message "org.eclipse.wst.common.project.facet.core.FacetedProjectFrameworkException: Failed while installing Crystal Reports Java 12.2.200.
Plugin Provider:.... Business Objects, an SAP company
Plugin name:.... Crystal Reports Eclipse Integration Library
Plugin ID:.... com.businessobjects.integration.eclipse.library
Version:.... 12.2.214.r1733"
Do you have any thoughts on this?
Thanks!
-Maria
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.