Skip to Content
0
Former Member
Nov 19, 2013 at 09:52 PM

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

1071 Views

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

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();     }     %>