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

List all the reports(objectclass = "report") based on the user access

Started by sumansohal, 06 Jun 2014 03:51:29 PM

Previous topic - Next topic

sumansohal

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 );
}
}

Song

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.