cancel
Showing results for 
Search instead for 
Did you mean: 

Extract data from active directory array

Former Member
0 Kudos

Hello,

I have recently connected Crystal Reports XI to Active Directory 2003. I am able to pull back a user's data like sAMAccountName, department etc.

However I am unable to pull back the groups that a user is assigned to. I am thinking this might be because they have multiple groups assigned to them?

Here is the code i am using to select and return the data for name etc:

SELECT name,company,department,samaccountname,mail,manager, mobile, memberof

FROM 'LDAP://OU=Interne,OU=Users,OU=Orkla Finans,DC=finans,DC=orkla,DC=net'

How would one return a user's groups that they are assigned to? I have tried entering the memberOf field in my code, but this returns empty. It seems like Crystal is returning the memberOF field as a string while it is stored as an array in Active Directory.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lars

The reason of this behaviour should be related to the type of information; in fact, the particular field that shows blank in CR, is ideally a multi-valued attribute.

On the other hand, this is not seem actually Crystal related; Microsoft has acknowledged this limitation in the article ID 299410 at

http://support.microsoft.com/kb/299410

The workaround is to report off a text file:

- From Active Directory Users and Computers or from ADSI Edit (where you would get more information), locate the level where you want the information retrieved from, for instance OU= (top level);

- Right-click on the folder and select u2018Export listu2019;

- Save the file in TXT format.

- From Crystal Reports, create new report;

- From Database Expert, click on u2018Create a new connectionu2019 folder;

- Double-click on u2018Access/Excel(DAO)u2019 folder;

- Change the u2018Database typeu2019 to u2018Textu2019 and select the u2018Database Nameu2019, which is the TXT file;

- Select u2018Finishu2019;

Should you have any questions, please do not hesitate to let us know.

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

I would be interested in an answer to this query as well