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

Regarding retrieving SearchPath of the users

Started by dipstm, 15 Feb 2008 06:54:53 AM

Previous topic - Next topic

dipstm

Hi All,
         I want to display the names of user alongwith the searchpath of users created in the namespaces using Cognos 8 SDK. If anybody has already implemented similar functionality please let me know the solution for the same.

Many Thanx in advance

Regards,
Dipstm

tmacfarlane

hello, here's a snippet to get you started.


public baseClass[] getGroups(string strNamespaceId)

        {

            string groups = "CAMID(\"" + strNamespaceId + "\")//group";

            propEnum[] props = new propEnum[] { propEnum.searchPath, propEnum.defaultName };

            baseClass[] groupObjects = new baseClass[]{};

            searchPathMultipleObject spMulti = new searchPathMultipleObject();

            spMulti.Value = groups;



            try{

                groupObjects = cmService.query(spMulti,props, new sort[]{}, new queryOptions());

            }



            catch (SoapException exSoap)

            {

                SoapExceptionHandler objEx = new SoapExceptionHandler(exSoap);

                MessageBox.Show(objEx.Details + objEx.Message + objEx.ErrorCode + objEx.Severity);

            }



            string[] groupSeachPaths = new string[groupObjects.Length];



            if (groupObjects.Length == 0)

            {

                MessageBox.Show("there were no Groups found");

            }



            return groupObjects;

        }