We have 300 reports and all are scheduled to go to 300 users as per their email ids. Now for time being I need to stop the scheduling, so could some one please give me an idea if it is possible to do this in a single shot?
But if I disable that server then other scheduling will also get affected. I do not want to stop other scheduled reports, there are specific 300 reports which I use to send on monthly basis, so I need to stop those reports. also could you please help me with the name of that server which does scheduling task?
aniketp, which version are you on? If XI3, you can use Instance Manager to view, and then pause, specified scheduled reports.
If you’re on XIr2 and you only want to pause certain reports, you can use a script I wrote. As it is, it pauses everything that is recurring, so you’d need to modify the SQL to fit your need.
{
String boeUser = "the username";
String boePassword = "the password";
String boeCMS = "the cms name";
IInfoObjects myoInfoObjects;
ISessionMgr oSessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession oEnterpriseSession = oSessionMgr.logon(boeUser, boePassword, boeCMS, "secEnterprise");
IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService("", "InfoStore");
//Execute the query
myoInfoObjects = oInfoStore.query("select top 100000 * from ci_infoobjects where si_recurring = 1");
for (int x = 0; x < myoInfoObjects.size(); x++)
{
IInfoObject oIO = (IInfoObject)myoInfoObjects.get(x);
ISchedulingInfo iSI = oIO.getSchedulingInfo();
if(iSI.getFlags() != ISchedulingInfo.ScheduleFlags.PAUSE)
{
iSI.setFlags(ISchedulingInfo.ScheduleFlags.PAUSE);
System.out.println(oIO.getTitle());
}
}
oInfoStore.commit(myoInfoObjects);
}
from this I assume you will be able to use joepeters’ code above, with a slight modification to it.
obtain a list of the IDs of the reports you would like to PAUSE you can use the utility found here to obtain these (column Report ID, use the Excel filters to narrow it down on the Documents Tab to the required reports)
Change code to replace
si_recurring = 1
with
SI_ID IN ('51414','63048','63055','63056','63057','63058')
where ‘51414’,‘63048’,‘63055’,‘63056’,‘63057’,‘63058’ = the list you have obtained fron step 1) above. You may have to break this down into smaller chunks of say 50 instead of passing all 300 ID’s in one go.
and hey presto they should all have PAUSED
I have not tried nor tested this, so please enlighten us if it works.
Thanks to all for inputs. See the reports are in a Favorite folder of a specific user. And I checked Instance manager, I can select all recurring instances but I cannot pause directly from there. So is there any way of doing it directly…?
Could some one please help me as this is getting bit urgent for me. Please help. Else I need to go for manual stop for 300 reports , but again if I want to start those reports, it would be complex and time consuming for me.
Hi Joe, thanks for your response. Actually that’s what I wrote previously, I am not able to understand how to implement that solution, so asked again. Sorry for bumping again, truly speaking, I couldn’t figure out from where I should start ?
Well, the code I posted was ripped from a java program, but it should work fine if it’s simply dropped into a jsp file. Assuming you’re running Tomcat or another java-based app server.
It’s worth mentioning that SDK scripts can cause serious damage if used incorrectly, so if SDK scripting is not familiar to you, I’d really recommend you work with someone who is.
Thanks Joe for your response. I understand what you mean to say, but the tragedy is there is no one who can help me on this platform. But we have a test environment set here, so if you explain me the process I can try to implement the same on test environment and if it works, I cam perform the same on Production environment. But the thing is I need to finish this till 29th Oct and if your method works then it would be a great help for me else I need to manually change the scheduling by deleting the email ids out of those reports and again when require I need to maintain everything again.
Could some one please help in this, or else I need to manually start this task which is very complex and time consuming. Please help. sorry to say , actually this is now critical for me, so I am bumping again.
Update the email destination address for all recurring instances to one specified value.
OR
Update all recurring instances so that notification is enabled on failure, and the notification goes to a specific email address.
I suspect the scripts would be similar, and if all things are equal I’d rather have the second once since it would probably prove more useful in the future.
I also suspect that it will be very similar to your example, so I’m posting here. I’m not a developer, but I have one handy if I can give him something pretty much ready to execute.