在Cognos中report运行结果为reportversion, 默认配置为 1。 可以在Cognos 修改report属性。
简单代码:
public void deleteReportVersion(String path, String[] format) throws RemoteException
{
PropEnum props[] = new PropEnum[]{ PropEnum.defaultName, PropEnum.searchPath };
SearchPathMultipleObject spMulti = new SearchPathMultipleObject(path);
BaseClass bc[] = this.cmService.query(spMulti, props, new Sort[] {}, new QueryOptions());
DeleteOptions delOptions = new DeleteOptions();
// deletereport_start_0
delOptions.setForce(true);
delOptions.setFaultIfObjectReferenced(false);
delOptions.setRecursive(true);
this.cmService.delete(new BaseClass[]{bc[0]}, delOptions);
}