→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
j0ngreen
Engaged Sweeper II
Hi

I am currently trying to get a report which lists each asset (in this case, laptop), the users that have logged onto it with dates and also IP addresses they have connected from but really struggling

When I say users that have logged on, I need it in the format the same as when you click on "config" on an asset, then "user info" and the "last logon" to list hsitorical access, not just the last user of the device

Can it be done?

J
1 ACCEPTED SOLUTION
Andy_Sismey
Champion Sweeper III
Sorry I get what you want now,sorry, I believe you need the table tblCPlogoninfo, you may need to add additional filters as there will be lots of results , but this will return all assets and all Users logged on with each logon date

Select Top 1000000 tblassets.AssetName,
tblassets.AssetID,
tsysassettypes.AssetTypeIcon10 As icon,
tblCPlogoninfo.Username,
tblCPlogoninfo.logontime,
tblassets.IPAddress
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tblCPlogoninfo On tblassets.AssetID =
tblCPlogoninfo.AssetID
Where tblassetcustom.State = 1

View solution in original post

10 REPLIES 10
Brilliant, its working I have made a couple of changes as the IP's were coming through all the same so I changed the IP pickup from Assets to logoninfo and also sorted the dates. Now I can track the pesky users 🙂

Select Top 1000000 tblassets.AssetName,
tblassets.AssetID,
tsysassettypes.AssetTypeIcon10 As icon,
tblCPlogoninfo.Username,
tblCPlogoninfo.logontime,
tblassetcustom.Model,
tblCPlogoninfo.Ipaddress
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tblCPlogoninfo On tblassets.AssetID =
tblCPlogoninfo.AssetID
Where tblassetcustom.State = 1
Order By tblCPlogoninfo.logontime

Thankyou so much!!!