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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
FrankB
Engaged Sweeper
I am reporting on systems across multiple domains that still have windows XP on them. I am able to pull out all the computer information i need including the last user to log on. I would now like to get some more detailed info in the report about that user (specifically the company attribute for that user in AD) to help us identify who owns them and am not sure how to do so. i need to capture this information along with all the info currently in the report if possible.

Below is the report i'm currently running. i'm very new to LS and just getting started trying to leverage the reporting tools. Thank-you for any pointers.


Select Top 1000000 tblAssets.FQDN,
tblAssets.Domain,
tblAssets.Description,
tsysOS.OSname,
tblOperatingsystem.Caption,
tblAssets.SP,
tblAssets.Lastseen,
tsysOS.Image As icon,
tblAssetCustom.Model,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssets.IPAddress,
tblAssetCustom.Serialnumber,
tblSystemEnclosure.ChassisTypes,
tblAssets.Username,
tblAssets.Userdomain
From tblAssets
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Where tblAssetCustom.State = 1
Order By tsysOS.OSname,
tblAssets.AssetName,
tblOperatingsystem.Caption
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
You need to link tblADusers to tblAssets on both the Username and Userdomain fields.
  • Double-click on tblADusers in the table list on the right to add the table to your report.
  • In the visual representation of the report in the upper section of the report builder, left-click and hold the Username field in tblADusers, drag it over to the Username field of tblAssets and let go of your mouse button to create a link.
  • Link the Userdomain fields as well.
  • Right-click on the link between tblADusers and tblAssets and tick "select all rows from tblAssets" to ensure that computers whose last logged on user is a local user are included in the report as well.
  • Tick the tblADusers fields you need and hit Save & Run.

View solution in original post

2 REPLIES 2
FrankB
Engaged Sweeper
That worked. Thank-you very much.
Susan_A
Lansweeper Alumni
You need to link tblADusers to tblAssets on both the Username and Userdomain fields.
  • Double-click on tblADusers in the table list on the right to add the table to your report.
  • In the visual representation of the report in the upper section of the report builder, left-click and hold the Username field in tblADusers, drag it over to the Username field of tblAssets and let go of your mouse button to create a link.
  • Link the Userdomain fields as well.
  • Right-click on the link between tblADusers and tblAssets and tick "select all rows from tblAssets" to ensure that computers whose last logged on user is a local user are included in the report as well.
  • Tick the tblADusers fields you need and hit Save & Run.