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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
juuladdict
Engaged Sweeper
Hi I couldn't find anything online and I am looking for some help. I am trying to create a custom report that displays all devices on my Lan which includes, model, serial, IP Address, and MAC Address however when I try to include the last user that logged on with display name, I get two results. One it shows everything perfectly fine except for he user id and display names are almost all blank. The other code it keeps repeating the device name but shows all user id's and display names so one device will be repeated about 50 times until the next. I have lansweeper logged in with a domain account and implemented active directory. Any help would be greatly appreciated.
Thanks

One of the codes I am using which does not work (Shows everything perfectly fine except user id's and display names are not showing up):

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblADusers.Username,
tblADusers.Displayname,
tblAssets.Mac,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Left Join tblADusers On tblAssets.Username = tblADusers.Username
Where (tblADusers.Displayname Is Null) Or
(tblADusers.Displayname = '' And tblAssetCustom.State = 1)
Order By tblADusers.Username

1 REPLY 1
juuladdict
Engaged Sweeper
bump