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

Get all the members in the role/group

Started by kulkarni, 17 Jun 2009 08:40:30 AM

Previous topic - Next topic

kulkarni

Using VB.Net, I am trying to extract all the members in a role/group and am having trouble getting the information.

The code is below -
Dim cognosRole As role = CType(cmService.query(objectPath, propertiesObj, sortOption, queryOption)(0), role)

If I try to loop through and display the members in the role, I am getting a NullException Error. In debug mode, I found out that there are no members in the role (see screenshot attached), however if I check in Cognos Connection, I do find several members for the role.

Do you know why this is happening? or if you have a better way to extract this information?

Thank you.

lindero

I'm a java programmer but nevertheless the structure should be the same.

Which properties do you list in your propertiesObj object? There must list up the property members. Then the property method getMembers isn't null but contains the members of the queried group/role.

Cheers

kulkarni

Mystery solved, I had not used propenum.members in my properties array. After adding it, I am able to see the members now.

Thank you.