COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => SDK => Topic started by: sumansohal on 06 Jun 2014 03:51:29 PM

Title: List all the reports(objectclass = "report") based on the user access
Post by: sumansohal on 06 Jun 2014 03:51:29 PM
I am working on Cognos 10.2.1 sdk.I am successfully running the sample programs in C#.

In one of the sample project ViewReports, I am getting 140 reports in the result set but I only have access to 138 reports.

Through Cognos Connection, I revoked my access to 2 reports and I am not able to see them when I log in though browser, but through this sample program, I am getting those 2 reports in the result set.

Is it possible to fetch reports based on the username access? Please help

Sample code is

         output.AppendFormat( "\nReports:\n" );

searchPathMultipleObject reportsPath = new searchPathMultipleObject();
reportsPath.Value = "/content//report";

baseClass[] bc = cBICMS.query( reportsPath, props, s, qo );
if( bc.Length > 0 )
{
foreach( baseClass report_item in bc )
{
output.AppendFormat( "  {0}\n", report_item.defaultName.value );
output.AppendFormat( "    {0}\n", report_item.searchPath.value );
}
}
Title: Re: List all the reports(objectclass = "report") based on the user access
Post by: Song on 24 Aug 2014 06:36:24 PM
SDK return show match whatever you see in Cognos Connection, otherwise it should considered as a bug.

What access did you revoke? If you revoked only execute permission, you surely will get the other 2 reports but you cannot execute them. You need to revoke traverse permission here to prevent your code from revealing them.