1 Reply Latest reply on Nov 16, 2009 4:03 PM by jduprez

    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is

    807580
      I need help. I am trying to prototype/proof of concept a stand alone application in Java, that will open a crystal report, and export it to a pdf. I have done this in visual basic 6.0 and VB.net 2005, but never in Java and I am having major problems. It has been a while since I used Java, and I have never done what I am trying to do. The following is the version of eclipse I am using and the version of crystal reports that I have:

      Eclipse Java EE IDE for Web Developers.
      Build id: 20090920-1017
      Eclipse Platform 3.5.1.M20090917-0800
      CR Developer
      Version 12.0.0.683
      Product Type: Full

      I have looked at the documentation from sap, and I have gone and imported the .jar files that they say you should import. I went into CRConfig.xml and removed the reportlocator tag so that I could use absolute paths to the report instead of relative paths. I read that I need to have all the imported .jar files in the Classpath. Are they referring to the Classpath tag in the Config file, or the Classpath environmental variable that you access through the control panel, or both. By the way I am using WindowsXP professional, and I am creating a desktop application, not a web based one.

      I threw together the following code just to see if I could open a crystal report:

      import java.io.IOException;

      import com.crystaldecisions.report.web.viewer.*;
      //import com.crystaldecisions.reports.reportengineinterface.*;
      import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
      import com.crystaldecisions.sdk.occa.report.data.*;
      import com.crystaldecisions.sdk.occa.report.reportsource.*;
      //import com.crystaldecisions.reports.sdk.*;
      import com.crystaldecisions.sdk.occa.report.lib.*;
      import com.crystaldecisions.sdk.occa.report.exportoptions.*;

      public class CrystalTest {
      public static void main (String args []) throws IOException, ReportSDKException{
      ReportClientDocument reportClientDoc = new ReportClientDocument();
      String report = "C:/Report1.rpt";
      try {
      reportClientDoc.open(report, 0);
      } catch (ReportSDKException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      System.out.println(e.getSDKError());
      System.out.println(e.getMessage());
      System.out.println(e.getCause());
      System.out.println(e.errorCode());
      }
      }
      }
      When I run it, I get the following exception thrown:

      com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is no server specified.---- Error code:-2147217390 Error code name:serverNotFound
      at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.do(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ClientDocument.new(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(Unknown Source)
      at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)
      at CrystalTest.AnotherTest.main(AnotherTest.java:15)
      Exception in thread "main"

      I need help. I need someone to give me advice. I spent two days trying to research this and havent gotten very far. I need specific advice. Baby-step advice. Go in and check this, or do that. Please dont assume I know anything. Any assistance is greatly appreciated. Thanks in advance
        • 1. Re: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is
          jduprez
          Welcome to the JDC forums (although this specific subject would probably deserve more to be brought up in a Crystal report forum).

          I've never used CrystalReport, nor its SDK (although I remember pointing another forum user at it recently ).
          However based on the info you provide:

          1) The exception occur in method called from com.crystaldecisions.sdk.occa.report.application.* classes, which suggest your classpath is not blatantly omitting Crystal SDK jars.

          2) The exception message complains that "There is no server specified"
          I don't know Crystal Reports architecture, but I suspect it involves a report generation server, and you probably have to give your application (presumably, a client of the report generation server) contact information so that it can access a running server. I don't know where these info have to be provided, maybe in your CRConfig.xml, maybe as parameters to the ClientDocument.open() method; look this up in CR SDK's docs.

          Good luck.