Hi Chris,
Whenever a User schedules an object he becomes the Owner of the scheduled instance and hence your requirement can be achieved using the below query in Admin Tools:
select * from ci_infoobjects where si_owner='User' and si_schedule_status=9
The above query will return all the objects whose Owner is User and schedule status is running.
The same can be achieved using a Web Application by deploying the below jsp:
%@ page import = "com.crystaldecisions.sdk.exception.SDKException"%>
<%@ page import = "com.crystaldecisions.sdk.occa.infostore.IInfoStore"%>
<%@ page import = "com.crystaldecisions.sdk.occa.infostore.IInfoObject"%>
<%@ page import = "com.crystaldecisions.sdk.occa.infostore.IInfoObjects"%>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<html>
<head>
</head>
<body>
<%
String cms = "localhost:6400";//machine name running the Central Management Server
String uid = "Administrator";//cms user
String pwd = "Password1"; //cms user's password (Enterprise authentication is used)
try {
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession eSession = sessionMgr.logon(uid, pwd, cms,"secEnterprise");
IInfoStore infoStore = (IInfoStore)eSession.getService("InfoStore");
String ibox ="select * from ci_infoobjects where si_owner='User' and si_schedule_status=9 ";
IInfoObjects result = infoStore.query(ibox);
out.println("The number of running instances is:" +result.size()+"<br>" );
out.println("The names are as follows:" +"<br>");
for(int i=0;i<result.size();i++)
{
IInfoObject infoObject = (IInfoObject)result.get(i);
out.println(infoObject.getTitle() + "<br>");
}
}catch(Exception e)
{
out.println(e);
}
%>
</body>
</html>
Hope this helps.
Regards,
Rajarsh