Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reporting of Active Directory (v. 9 & 10)

Connection Problems

Reporting of Active Directory (v. 9 & 10)

by  poujor  Posted    (Edited  )
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.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top