Skip to Content
0
Former Member
Mar 20, 2009 at 05:26 PM

getting scheduling status

32 Views

I am having problems get the status of new schdeuled report.

After scheduling , I get the SI_ID

 jobId= report.properties().getProperty(CePropertyID.SI_NEW_JOB_ID)

Next I try to query the report instance to retrieve the status

String query =    "Select SI_NAME, SI_ID, SI_UPDATE_TS, SI_SCHEDULE_STATUS, SI_OWNER " +
				
				"From CI_INFOOBJECTS Where " +
				
				"SI_INSTANCE_OBJECT=1 AND " +
				
				"SI_ID="+jobId;
		
		
		
	
		
		IInfoObjects results = null;
		
		try {
			
			results = iStore.query(query);
			
		}
		
		
		
		
		
		catch(Exception e) {
			e.printStackTrace();
		} 

Unfortunately , the results.size() is coming as zero.It is not finding the report instance. why ?

If I re-login before getting the status

 ISessionMgr sm = CrystalEnterprise.getSessionMgr()
		enterpriseSession = sm.logon("pradeep","pradeep",cms,authentication)
		iStore = (IInfoStore) enterpriseSession.getService("InfoStore")

The results.size() comes to 1. So why do I need to login twice in the same program to get the status. Why is the server not able to recognize the SI_ID of just scheduled report, why do need to login again /restart program