This example retrieves the first report named MyReport.rpt, and schedules it to run every two months, starting immediately.
Set IStore = Session("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.
Set Result=IStore.Query("Select SI_SCHEDULEINFO From CI_INFOOBJECTS Where SI_NAME='ScheduledReport.rpt'")
Set ReportObject=Result.Item(1)
'Create an interface to the scheduling options for the report.
Set SchInfo = ReportObject.SchedulingInfo
'Use the scheduling object to set the scheduling options
'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."
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |