I have had a lot of problems reporting on data from Active Directory. The Article c2016008 on http://support.businessobjects.com/library/kbase/articles/c2016008.asp is a very good starting point.
The Examples applied are not that good though. Below is an example of how to select fields from Active Directory:
Select distinguishedName, cn, mail, sAMAccountName, userPrincipalName, telephoneNumber, department, userAccountControl, objectClass
From
'LDAP://DC=CrystalReports, DC=com'
Where ObjectClass='User'
Above retrieves the following fields:
distinguishedName, cn, mail, sAMAccountName, userPrincipalName, telephoneNumber, department, userAccountControl, objectClass
FROM the domain CrystalReports.com
WHERE The ObjectClass Is USER.
Tools to use to figure out field names etc. is: AdisEdit (Adsiedit.msc). This tool is a part of the support tools for windows 2000 or 2003 server.
Also Schema Management (SchmMgmt.msc) might be of interest. Be careful with this tool it can be very destructive if you start modifying. To use this tool the following dll is to be registered: schmmgmt.dll. This is done in the following way:
Regsvr32 %systemroot%\system32\schmmgmt.dll
To use the Schema Management tool the adminpak.msi is required to be installed on the computer you are using it.
On windows 2000 professional use the adminpak.msi from windows 2000 server editions. On wWindows XP use the Adminpak.msi from windows 2003 server editions.
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.