Topic
  • No replies
SystemAdmin
SystemAdmin
217 Posts

Pinned topic Get Drill Targets using Cognos SDK

‏2012-07-25T16:23:56Z |
We're using the Cognos SDK 10 to retrieve and display reports in a custom front-end.

I'm using this code to get the Drillthrough Paths (thanks murali999!), toegether with "PropEnum.paths" in the CM query:

AuthoredReport r=(AuthoredReport) report[0];
if(r.getPaths()!=null)
{
NavigationPath [] n=r.getPaths().getValue();
if(n !=null)
{

for(int p=0; p< n.length ;p++)
{
BaseClass [] bs=n[p].getTarget();
if(bs != null )
System.out.println("DrillThroughPaths : "+bs[0].getSearchPath().getValue());
}
}
}

This works perfectly, except if I have multiple drills defined that drill into the same report. For example, if I have two drills defined both of which have target is report "A", then I only get one row returned from getPaths().

When same the report is displayed in the Cognos Viewer I see two DrillThroughTarget rows added to the drillTargets javascript array. How can I replicate this functionality?