I found the code. This is taken from a class that I wrote that updates reports in the CMS from a .rpt file that is outside of the CMS. This method for updating the file of the report is totally unsupported by SAP, but it works for XI 3.1 (I haven't tried doing any of this in 4.0 yet....) "_rptPath" is the physical path to the input filestore, such as C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\FileStore\Input. You would need code code to either enter it in your utility, pull it from a configuration file, or something of the sort.
You should be able to modify this for your needs.
private void updRpt(string rptFile, string alias, string rptDescrip, int folderID)
{
string query = "Select * from CI_INFOOBJECTS where SI_ID = " + _rptID.ToString();
using (InfoObjects io = _common.BOEInfoStore.Query(query))
{
if (io.Count > 0)
{
Report newRpt = (Report)io[1];
//Strip the pointer to the file repository server off of the front of the path
//and add the actual UNC file path to the input file repository files.
string fileName = newRpt.Files[1].Name.Replace("frs://Input", _rootPath);
fileName = fileName.Replace('/', '\\');
FileInfo fi = new FileInfo(rptFile);
fi.IsReadOnly = false; //If we copy a read-only file, we can't overwrite it later.
fi.CopyTo(fileName, true);
newRpt.RefreshProperties();
updateLogon(newRpt, alias);
_common.BOEInfoStore.Commit(io);
}
else
{
_errMsg = "Unable to update report: Report Not Found";
}
}
}
private void updateLogon(Report newRpt, string alias)
{
for (int j = 1; j <= newRpt.ReportLogons.Count; j++)
{
//set the database alias, user ID, and password
newRpt.ReportLogons[j].UseOriginalDataSource = false;
newRpt.ReportLogons[j].CustomServerName = alias;
newRpt.ReportLogons[j].CustomUserName = _rptUser;
newRpt.ReportLogons[j].CustomPassword = _rptPW;
}
}
-Dell