Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a report from one folder to another

Status
Not open for further replies.

WhiZa

Programmer
Jan 25, 2002
11
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top