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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AD and Crystal Reports

Status
Not open for further replies.

Roadki11

MIS
Mar 23, 2005
1,097
US
I know this is cross posting but no one in the Crystal Reports forum is bitting. I figure server guys know a little about everything so i wanted to try here as well.

Looking for some help figuring out why some AD schema attributes will not show data in crystal. I am using OLE DB (ADO) Active Directory Services Interface as my connector. I am creating a simple report, user name, when the account was created, last good logon, last logoff, last bad logon, and bad password count. I dont have any problem writing the ldap connection string and i get all the fields/attributes i want. My problem is some of the fields are empty of data in crystal even though i know they have data in AD. it seems to be a datatype issue im guessing. In the AD schema lets say the attribute is lastLogon, the data type is Large Integer/Interval(even though its a date and time stamp), if you look at it in crystal it states its a string. I am not sure if this is the problem or not but any AD attributes with the data type Large Integer/Interval comes out in crystal as string and displays no data. Now its also my understanding AD stores date and time stamps as some long integer and needs to be decoded to show the human readable date and time one would expect to see(i will deal with that in due time), but i cant get crystal to even show that long integer. Any thoughts on this would be a great help.

Thanks,


RoadKi11

"This apparent fear reaction is typical, rather than try to solve technical problems technically, policy solutions are often chosen." - Fred Cohen
 
RoadKi11 ---

You've delved more into this than I have, I played with it once, just to play with it but didn't go much past that so I can't say to much about the details but my first question would be what version of Crystal do you have --- and is it a full developer version or one of the lite versions (like what comes with visual studio). As for the integer data types and not having them show up right -- you may have an overflow problem where the size of the integer being stored in AD is bigger than the size of the integer type which Crystal supports -- maybe trying an explicit conversion to an unsigned integer and gain an extra bit.

You've gotten me hooked, I know what I"m going to be playing with at work on Wednesday!

TNG / Mark L.
 
Although I have never done this myself, I found the following

Ex)
Create an OLE DB, ADO connection, then add command Active Directory Service Interfaces:
select ADsPath, cn, ou, distinguishedName, name, mail, company, description, department, logoncount from 'LDAP://ou=myOU,dc=myDomain,dc=co,dc=uk'

Don't know if you already tried this

 
Thanks for the replies guys.

TNGPicard, i am using CR11 pro. I am not totally convinced its an overflow problem but i wont it rule out either. Im starting to wondering if it might be an issue with my ldap query string. The AD schema is broken down into two categories, Classes(which i intrepret as tables) and Attributes(which i interpret as fields). My ldap connection string is just calling for attributes not classes. Maybe i need to do some sort of table join. The connection string im using doesnt generate any errors but as you know if you have played with this in the past, its very picky and blows up over the smallest detail. however, just because my connection string doesnt generate errors doesnt mean its correct either.

itsp1965, thats basically what i formed my initial query/connection string off of. My problem seems to be with the data type or maybe a table join(if you look at the AD Schema snapin they call it Syntax(but they look like data types to me). Example, the cn attribute has a syntax/data type of unicode string, it populates data in cystal no problem. But attributes like lastLogon with a syntax/data type of Large Integer/Interval populates no data in crystal.

please keep the ideas coming, i would love to be able to run the report and have unusual activity highlighted like logon attempts out side of logon hours, or nice little report of locked out accounts every morning, things like that.



RoadKi11

"This apparent fear reaction is typical, rather than try to solve technical problems technically, policy solutions are often chosen." - Fred Cohen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top