If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Retrieving Report Path

Started by n_ramesh_in, 14 Jun 2007 10:10:50 AM

Previous topic - Next topic

n_ramesh_in

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

that_pesky_guy

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.