Skip to Content
Former Member
Sep 24, 2013 at 06:44 AM

C# code to copy report to different folder using infoobject.Copy not working


Hi.. i have written c# code using the code specified in NET-VB2008 Enterprise BI14 Copy Report-to-New-Folder and used administrator id to execute the code. Howevere while the report is copied sucessfully, when i open it from infoview, i get the error "The document can't be retrieved from the file repository server Please contact your BO administrator (Error: WIS 30951 (Error:INF))". I have googled the error code and believe it is due to the fact that output File Files/Filepath is empty. Please guide on how to solve this error?

Below is the code that I am using

//grab the report we want to copy
+ " where SI_ID='" + SelectedReportDetails.Rows[i]["ID"].ToString() + "'";
boInfoObjectsToCopy = boInfoStore.Query(query);

if (boInfoObjectsToCopy.Count > 0)
//Retrieve the InfoObject instance from the first index of the InfoObjects indexed class.
InfoObject infoObject = boInfoObjectsToCopy[1];

//Create a copy of the InfoObject instance with a new ID.
InfoObject infoObjectInPackage = boInfoObjectsToCopy.Copy(infoObject, CeCopyObject.ceCopyNewObjectNewFilesKeepFileName);
////Downcast the newly created InfoObject instance to a Webi instance.
Webi reportInPackage = (Webi)infoObjectInPackage;

//set the destination folder as target folder and change the report name
boInfoObjectsNewFolder = boInfoStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_Kind='Folder' and SI_Name like '%" + SelectedReportDetails.Rows[i]["TargetFolder"].ToString() + "%'");

reportInPackage.Title = SelectedReportDetails.Rows[i]["ReportName"].ToString();
reportInPackage.ParentID = boInfoObjectsNewFolder[1].ID;
//Call the Commit method of the InfoStore instance, passing in the enclosing InfoObjects indexed class.


Need solution to fix this issue please Message was edited by: Div Vchari