SAP Knowledge Base Article - Public

1198848 - How to report off Active Directory in Crystal Reports?


  • How to report off MS Active Directory?
  • How to create a report in Crystal Reports off the Microsoft Active Directory?
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016 


  • To report off Microsoft Active Directory, use the OLEDB Provider from Microsoft called: OLE DB Provider for Microsoft Directory Services
    1. In Crystal Reports, create a new blank report.
    2. In the "Database Expert: window, under "Create New Connection", doouble click on "OLEDB Data Sources (ADO)"
    3. In the 'Data Link Properties' dialog window, select "OLE DB Provider for Microsoft Directory Services" and then click "Next"
    4. For the 'Data Source', enter the full computer name of the server where the connection is being made.
    5. For the 'Location' text box, enter the UNC path to the directory where the Active Directory ntds.dit file is located.
    6. When prompted to enter information to log on to the server, select the option 'Use Windows NT Integrated security' and click  'OK'.
    7. Click 'OK' again to go back to the "Database Expert" window.
    8. Under the new connection, double click on "Add Command"
    9. In the "Add Command To Report" window, enter the SQL Query to retreive the Active Directory. For example the SQL Query will look like:
          SELECT ADsPath, cn FROM 'LDAP://OU=ou,DC=sports,DC=xtremebikes,DC=com'
      Note: In the above example the domain is:
    10. Click "OK" to accpet the SQL Query.
    11. Back to the "Database Expert" window, click "OK"
    12. In the "Filed Explorer" pane, usually located on the right side, expand the data object to show the Active Directory fields available to report from.
  • Note: For information on how to write a query for the Microsoft Active Directory, consult your IT, or Microsoft documentation on the OLE DB Provider for Microsoft Directory Service.


KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To


SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016