Skip to Content
author's profile photo Former Member
Former Member

Export from Java report viewer issue

Hi all,

I am trying to export a report from Java report viewer and get the following message:

com.businessobjects.crystalreports.viewer.core.rs.b$e cannot be cast to com.crystaldecisions.xml.serialization.IXMLSerializable

This happens whatever format I choose to export to. I guess I imported the wrong package... Any idea?

Also while trying to export a file to my desktop (MS Vista), I get a message says no write access to the selected file. Is this a setting issue? Can report be exported to desktop?

Regards,

Dong

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2008 at 07:43 AM

    I am using the JFrame example I found from the tutorial to display a report in a Java report viewer. Here are packages imported by the example:

    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    
    import javax.swing.JFrame;
    
    import com.crystaldecisions.ReportViewer.ReportViewerBean;
    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
    
    public class ReportViewerFrame extends JFrame {
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2008 at 02:15 PM

    I haven't seen that exact error message before, however one thing I noticed is that you are not importing the correct ReportClientDocument object. There are two SDK's that use that object; one is called Report Application Server and the other called the Java Reporting Component.

    You will want to change this line:

    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;

    to this:

    import com.crystaldecisions.reports.sdk.ReportClientDocument

    The first line is the RAS report object and the second line is the JRC report object. If you use the thick client viewer you will need to use the JRC because it is currently only fully supported with the JRC SDK.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.