I am using Crystal Enterprise attempting to copy a report from one web folder to another via the API. I've tried using the Copy Method but with no luck. Has anyone done this before? Here's my attempt:
function moveReport (IStore, source, destination)
{
var Reports = IStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME = '" + source + "'");
var Report = Reports.Item (1);
var Folders = IStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME = '" + destination + "'");
var Folder = Folders.Item (1);
Folder.Copy(Report,2);
}
It gives me the error "Object doesn't support this property or method", but the Copy method is part of InfoObject (which is what the object Folder is). Any ideas?
function moveReport (IStore, source, destination)
{
var Reports = IStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME = '" + source + "'");
var Report = Reports.Item (1);
var Folders = IStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME = '" + destination + "'");
var Folder = Folders.Item (1);
Folder.Copy(Report,2);
}
It gives me the error "Object doesn't support this property or method", but the Copy method is part of InfoObject (which is what the object Folder is). Any ideas?