I have a CSP page written in JavaScript that has a function to take in certain parameters and creates a report schedule (recurring instance) in Crystal Enterprise. I need to be able to retrieve the Crystal Enterprise instance ID for the recurring instance I just created. I'd like to do this in the same function so that I can store it somewhere else. I have a custom interface that contains information I would like to link to this instance ID. Does anyone know how I can create the recurring instance and retrieve the instance ID while still in the same session? Here are some of the pieces I have written:
var IStore;
IStore = RetrieveIStore();
//Retrieve the report from the InfoStore.
var reports = IStore.Query("Select * From CI_INFOOBJECTS Where SI_ID = " + reportid);
var report = reports.Item(1);
var reportInterface = report.PluginInterface("");
//I then set the format time and the smtp options before doing the following:
try
{
IStore.Schedule(reports);
}
catch (e)
{
Response.Write("<script language='javascript'> window.alert(‘Cannot email report.'); </script>");
}
var IStore;
IStore = RetrieveIStore();
//Retrieve the report from the InfoStore.
var reports = IStore.Query("Select * From CI_INFOOBJECTS Where SI_ID = " + reportid);
var report = reports.Item(1);
var reportInterface = report.PluginInterface("");
//I then set the format time and the smtp options before doing the following:
try
{
IStore.Schedule(reports);
}
catch (e)
{
Response.Write("<script language='javascript'> window.alert(‘Cannot email report.'); </script>");
}