Recce,
This macro is available from the Cognos Website (KB) and works a treat. Alterations required if you want a .csv instead.
lex
----------------------------------------------------------
Option Explicit
Sub Get_Users_List(UserClass As Object)
Dim I As Integer
If UserClass.Users.Count > 0 Then
For I = 1 To UserClass.Users.Count
Print #1, UserClass.Name, UserClass.Users(I).Name
Next
else
Print #1, UserClass.Name & ":"
End If
If UserClass.UserClasses.Count >= 0 Then
For I = 1 To UserClass.UserClasses.Count
Call Get_Users_List(UserClass.UserClasses(I))
Next
End If
End Sub
Sub Main()
Dim objAuthApp As Object ' Access Manager Application Object
Dim objAuthDoc As Object ' Access Manager Document Object
Dim objDSConfig As Object
I've got this macro working for my users, however, how would you go about extracting the BasicSignon id for each user as well? I've taken a quick look at the help file but can't get it to work.
I'm not sure this is possible; it would appear to be add or delete only, as use of the objUser.IdentificationInformation.BasicSignons command gives a R440 "AccessAdmAuto:Unable to read write-only property."
There is a sample application that I wrote called Access Reported (available on the Cognos support site). It has all the necessary source code (VB) that shows how to do the recursive calls. IF you can't find it or don't have access, let me know.
flex,
Have D/L'd it from the site, thanks. The problem I have is that it is configured for cer2 installation, not cer3. I lack the tools to correct the .exe (or recompile from vba), but it looks good from the manual!
Let me know if an updated version becomes available.
regards,
lex
There should also be a version for cer3 available. If it is not, I'll have to make sure that it gets replaced. In the meantime, you can modify the code (think it was a one or two line change as it performs a registry lookup).
Some of the users have an OS Signon, some have a BasicSignon, and some have both. I want to extract both of these userIDs into the text file.
The macro I've edited would work if the user currently has both of these set, but doesnt work when both of these values are not set. (I'm getting a macro error saying "Object value is set to nothing")
I want to add 2 if statements and 2 variables to check if the value is present and if not use "<none>", but I can't figure out what syntax I need to have in the IF condition.
ie. I've declared the var "BasicSignonValue", and the If statement will be something like:
[blue]
If (UserList(I).IdentificationInformation.BasicSignons.item(1).Name = ???) Then
BasicSignonValue = "<none>"
Else
BasicSignonValue = UserList(I).IdentificationInformation.BasicSignons.item(1).Name
End If[/blue]
What value/function do I need to be performing in the If condition to get the macro to work correctly? I would have thought I'd use [blue]If UserList(I).IdentificationInformation.BasicSignons.item(1).Name is Nothing Then ...[/blue] or [blue] If IsNull(UserList(I).IdentificationInformation.BasicSignons.item(1).Name) Then ...[/blue] but they don't work.
If (UserList(I).IdentificationInformation.BasicSignons.Count = 0 Then
BasicSignonValue = "<none>"
Else
BasicSignonValue = UserList(I).IdentificationInformation.BasicSignons.item(1).Name
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.