COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => SDK => Topic started by: zrolf on 16 Aug 2013 10:10:41 AM

Title: SDK: unable to retrieve report property: Location
Post by: zrolf on 16 Aug 2013 10:10:41 AM
Dear All,

by the SDK(java) I am listing out all reports that we have along with some main properties such as searchpath, name, status, owner, screentip, description, policies, permissions, .. which can all be found pretty quick.

Alone report location, easy to spot via CognosConnection, no multi language attribute, I don't seem to be able to retrieve via the SDK !

Neiter am I seeing any post or google hit which could cover it ..  any help much appreciated, I am loosing too much time on this and am wondering whether it is constructed from searchpath and is no persistant property ?

Also tried to seach location via SQL and ContentStore .. not much luck either (as anticipated really whenever trying to get something useful out of the CS directly)

Thanks !


      PropEnum props[] = new PropEnum[] { PropEnum.searchPath,
            PropEnum.defaultName, PropEnum.disabled, PropEnum.creationTime,
            PropEnum.modificationTime, PropEnum.owner, PropEnum.version,
            PropEnum.dataSourceName, PropEnum.contentType,
            PropEnum.metadataModelPackage, PropEnum.metadataModel,
            PropEnum.packageBase, PropEnum.permissions, PropEnum.policies,
            PropEnum.metadata, PropEnum.format, PropEnum.screenTip,
            PropEnum.description, PropEnum.dataSize,
            PropEnum.objectClass, PropEnum.location
Title: Re: SDK: unable to retrieve report property: Location
Post by: zrolf on 20 Aug 2013 05:39:54 AM
Hi All,

realizing that there is quite a high number of viewers but not many replies to the various posts ..

NB: I have tried casting to the usual classes: baseClass, uiClass, baseReport, authoredReport ..  although there is a location on class PropEnum, I am not finding its getter() !

Still very much appreciating any comments !

thanks
Title: Re: SDK: unable to retrieve report property: Location
Post by: sir_jeroen on 19 Sep 2013 05:10:42 PM
Take a look at the ancestors. this array can you use to construct the location..
Title: Re: SDK: unable to retrieve report property: Location
Post by: zrolf on 20 Sep 2013 06:57:11 AM
cool - thanks !

Simply add: PropEnum.ancestors
...

bc.getAncestors()
..
String location = "";
for (int i = 0; i < anArray.getValue().length; i++) {
   location = anArray.getValue().getSearchPath().toString();
}


Just wondering what the intention of "PropEnum.location" then was ?

thanks !!
Title: Re: SDK: unable to retrieve report property: Location
Post by: sir_jeroen on 29 Sep 2013 06:56:41 AM
QuoteJust wondering what the intention of "PropEnum.location" then was ?
Sorry can't tell you that....