Hi All,
Is there any way to retrieve the path of the report stored on cognos server thru the SDK code in java?..Can anyone send me the code snippet?
ramesh
First you have to make sure your call to the query() method includes the appropriate props enumerations:
BaseClass result = null;
PropEnum[] props = new PropEnum[]{
PropEnum.searchPath // add other properties you want in the response to this list
};
Sort[] s = {};
// then call the query() method
SearchPathMultipleObject spMultiple = new SearchPathMultipleObject();
spMultiple.setValue(searchPath);
QueryOptions queryOptions = new QueryOptions();
try{
result = cmPort.query(spMultiple, props, s, queryOptions);
}
// catch any problems here
Each item in the result array will now have its searchPath property set (if applicable). You can call the item's getSearchPath().getValue() to retrieve the string.