cancel
Showing results for 
Search instead for 
Did you mean: 

The import com.crystaldecisions.sdk.occa.report cannot be resolved

Former Member
0 Kudos

Hello Experts, The code below is as per SAP NOTE 1722438 - How to retrieve failed instance information stored in the cms repository using BusinessObj...

I have an issue

1. I am not able to use com.crystaldecisions.sdk.occa.report.lib.PropertyBag.

Error: The import com.crystaldecisions.sdk.occa.report cannot be resolved

Are there any libraries or APIs that I am missing, if so can you point me to the folder where I can import the external jar from?

<%@ page import="com.crystaldecisions.sdk.plugin.desktop.program.*,

   com.crystaldecisions.sdk.framework.*,   

   com.crystaldecisions.sdk.occa.infostore.*,

      com.crystaldecisions.sdk.exception.*, 

         java.io.FileWriter, java.io.IOException,

           com.crystaldecisions.sdk.properties.IProperties, 

                  com.crystaldecisions.sdk.properties.IProperty,  

                   java.util.*"

                   %>

<%

      String user = "Administrator";

String password = "password";   

String cmsName = "cmsname:portnumber";   

String cmsAuthType = "secEnterprise"; 

String starttime=null;  

String endtime=null;

String retriesAttempted=null;

IEnterpriseSession es=null;  

try  {    String statusCheck=null; 

String typeCheck=null;  

es = CrystalEnterprise.getSessionMgr().logon( user, password, cmsName, cmsAuthType);       

IInfoStore iStore = (IInfoStore) es.getService("", "InfoStore");           

IInfoObjects infoobjects = iStore .query("SELECT * from CI_INFOOBJECTS WHERE  si_instance=1 and si_schedule_status=3");    

for(int i=0;i<infoobjects.size();i++)   {    IInfoObject infoobject=(IInfoObject) infoobjects.get(i); 

ISchedulingInfo schedInfo=infoobject.getSchedulingInfo();    int instanceID=infoobject.getID();  

String instanceName=infoobject.getTitle();    String errorMsg=schedInfo.getErrorMessage();  

out.println("<b>Instance ID :</b>"+instanceID+"<br>");    out.println("<b>Instance Name :</b>"+instanceName+"<br>");  

int type=schedInfo.getType();    out.println("<br><b> Type of the report :</b><br>");

switch(type)   

{   

case CeScheduleType.ONCE:      typeCheck="ONCE";   

out.println(typeCheck);   

break;      

case CeScheduleType.HOURLY:

     //Job has failed.     typeCheck="HOURLY"; 

     out.println(typeCheck); 

     break;         

     case CeScheduleType.DAILY: //Job is paused.   

     typeCheck="DAILY";  

     out.println(typeCheck); 

     break;         

     case CeScheduleType.WEEKLY: //Job is pending.

     typeCheck="WEEKLY";  

     out.println(typeCheck); 

     break;       

     case CeScheduleType.MONTHLY: //Job is running.  

     typeCheck="MONTHLY";    

     out.println(typeCheck);

     break;        

     case CeScheduleType.NTH_DAY:      typeCheck="NTH_DAY";  

     out.println(typeCheck);

     break;           

     case CeScheduleType.FIRST_MONDAY: //Job has failed.  

     typeCheck="FIRST_MONDAY";  

     out.println(typeCheck);

     break;         

     case CeScheduleType.LAST_DAY: //Job is paused.   

     typeCheck="LAST_DAY";    

     out.println(typeCheck);  

     break;        

     case CeScheduleType.CALENDAR: //Job is pending.

     typeCheck="CALENDAR"; 

     out.println(typeCheck);  

     break;           

     case CeScheduleType.CALENDAR_TEMPLATE: //Job is running.  

     typeCheck="CALENDAR_TEMPLATE";  

     out.println(typeCheck);   

     break;    }     

    IProperties instanceProperties=(IProperties)infoobject.getSchedulingInfo().properties();

    IProperty instanceProperty=instanceProperties.getProperty("SI_STARTTIME"); 

    if(instanceProperty != null)    {

    starttime=instanceProperty.getValue().toString(); 

    out.println("<br><b>Instance Start Time :</b>"+starttime+"<br>"); 

    }

    IProperties instanceProperties1=(IProperties)infoobject.getSchedulingInfo().properties();  

    IProperty instanceProperty1=instanceProperties1.getProperty("SI_ENDTIME"); 

    if(instanceProperty1 != null)    {      endtime=instanceProperty1.getValue().toString(); 

    out.println("<br><b>Instance End Time :</b>"+endtime+"<br>");

    }    IProperties instanceProperties2=(IProperties)infoobject.getSchedulingInfo().properties();

    IProperty instanceProperty2=instanceProperties2.getProperty("SI_RETRIES_ATTEMPTED");  

    if(instanceProperty2 != null)    {      retriesAttempted=instanceProperty2.getValue().toString();

    out.println("<br><b>Retries Attemted :</b>"+retriesAttempted+"<br>");

    }    out.println("<b>Error Message :</b>"+errorMsg+"<br>");       

    out.println("<br>====================================================================<br>"); 

    } 

}      catch(SDKException e)  {    out.println(e.getMessage());

    }  finally

   { 

       es.logoff();

    }

    %>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Peter,

I am assuming that you are trying to execute this code on BI 4.0 version.

Make sure you have CrystalReportsSDK.jar file included in your project.The class for which the exception is thrown is contained in CrystalReportsSDK.jar file.

All core JAR files and language resources JAR files are installed in the following directory:

<Install Dir>\SAP BusinessObjects Enterprise XI 4.0\java\lib

Dependent JAR files are installed in the following directory:

<Install Dir>\SAP BusinessObjects Enterprise XI 4.0\java\lib\external

For more detailed information, refer to the developer guide available at:

Developer Guide

In the developer guide, look for section "Setting up the development environment".

Hope it helps.

Regards,

Anchal

Former Member
0 Kudos

Anchal,

Thanks for the response. Yes I am using 4.0 SP6 P1.

Adding CrystalReportsSDK.jar file resolved the issue.

Answers (0)