This example retrieves the first report named MyReport.rpt, and schedules it to run every two months, starting immediately.
<META HTTP
<!-- #include file=helper_js.csp -->
var IStore = GetSession("IStore");
//The following line queries for a report named ScheduledReport.rpt.
//Change the value of SI_NAME to the name of a report that has been scheduled.
var Result=IStore.Query("Select SI_SCHEDULEINFO From CI_INFOOBJECTS where SI_NAME='ScheduledReport.rpt'");
var ReportObject=Result.Item(1);
//Create an interface to the scheduling options for the report.
var SchInfo = ReportObject.SchedulingInfo;
//Use the scheduling object to set the scheduling options.
//Use the scheduling object to set the scheduling options.
SchInfo.IntervalMonths.Value = 2;
//The line below is commented out in this example to ensure that the report
//is not changed. For this example to work correctly, however, this line must run.
Response.Write("The report has been scheduled to run right now.");
Response.Write("There were errors. Confirm that you are logged on and the sample has been appropriately modified.");
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |