on 06-02-2009 11:36 AM
Hi,
I am new to Crystal Reports. Previously I was using a VBScript to extract data from Active Directory, I want to automate this with Crystal Reports, because of layout options.
Within my reports I need the value "LastLogonTimeStamp". This value is a 64-bits integer as indicated by documentation written by Microsoft:
http://www.microsoft.com/technet/scriptcenter/topics/win2003/lastlogon.mspx
If I retrieve the value with a OLE DB (ADO) Microsoft Active Directory Services Interface the fields remain empty. When I click browse data the box also remains empty. I already tried converting the field to aa string value after quering it with Crystal, but no results.
Does anyone know a solution to this problem? With VBScript this problem is solved like this:
Set objUser = GetObject("LDAP://cn=Ken Myer, ou=Finance, dc=fabrikam, dc=com")
Set objLastLogon = objUser.Get("lastLogonTimestamp")
intLastLogonTime = objLastLogon.HighPart * (2^32) + objLastLogon.LowPart
intLastLogonTime = intLastLogonTime / (60 * 10000000)
intLastLogonTime = intLastLogonTime / 1440
Wscript.Echo "Last logon time: " & intLastLogonTime + #1/1/1601#
Thank in advance for your reply.
Kind regards,
Laurens
Crystal does not have the ability to access info from an AD server and there is a limit to 16 digits to report on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.