cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
enz1ey
Engaged Sweeper II
How would I generate a report consisting of computers with a specified software installed (Symantec Cloud) and have the username(s) last logged on displayed?
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
The last logged on username is stored in tblAssets.Username. You could add this field to a report like the built-in "Software: List of software by computer". Please find an example below. Instructions for running reports can be found here. If you are interested in building or modifying reports, we would recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder uses standard SQL queries. This seems like a good tutorial.
- Updating to Lansweeper 5.2, if you haven't already. Lansweeper 5.2 includes a database dictionary, which is linked at the top of the report builder.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Username,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblSoftwareUni.softwareName Like 'example software%' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version

View solution in original post

3 REPLIES 3
Daniel_B
Lansweeper Alumni
You will get this by adding tblADusers, which contains all details of AD user accounts. Join it to tblAssets through the fields Username and Userdomain.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblADusers.Displayname As [User],
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Where tblSoftwareUni.softwareName Like 'example software%' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version
enz1ey
Engaged Sweeper II
That's exactly what I'm looking for, thanks! But is there any way to make that show the user's display name? So I can see their full name rather than usernames?
Daniel_B
Lansweeper Alumni
The last logged on username is stored in tblAssets.Username. You could add this field to a report like the built-in "Software: List of software by computer". Please find an example below. Instructions for running reports can be found here. If you are interested in building or modifying reports, we would recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder uses standard SQL queries. This seems like a good tutorial.
- Updating to Lansweeper 5.2, if you haven't already. Lansweeper 5.2 includes a database dictionary, which is linked at the top of the report builder.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Username,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblSoftwareUni.softwareName Like 'example software%' And
tblAssetCustom.State = 1
Order By tblAssets.AssetName,
software,
version