cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
iCe303
Engaged Sweeper
Hi all.
New Lansweeper user here, and I'm still learning.
I need to make a quick report of all the computers, there were seen in the last 30 days, and exclude all the computers

I can do a report of computers not seen in at least 30 days, but I can't do the opposite.
I cannot delete old computers / computers that don't exist anymore because of equipment history.

Thank you in advance for any help
Best regards
3 REPLIES 3
Shawn_Heydorn
Engaged Sweeper
I think this date format works better. For PC's lastseen older than 30 days.

Where tblAssets.Lastseen Between DateAdd(day, -60, Current_TimeStamp) And
DateAdd(day, -31, Current_TimeStamp) And tsysAssetTypes.AssetTypename Like
'Windows%' And tblComputersystem.Domainrole < 2 And tblState.Statename =
'Active'
iCe303
Engaged Sweeper
Thank you so much. It was this kind of report that I needed. Can it be modified to include Mac / OSX?
Thank you once again
David_G
Lansweeper Employee
Lansweeper Employee
If I understood you correctly, you want to have a report of all assets that have the 'last seen' date updated in the last 30 days. The 'last seen' field only gets updated when an asset is scanned successfully.

I have made a report for Windows computers that have been seen in the last 30 days, i.e. successfully scanned in the last 30 days. Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
  • Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
  • Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.Lastseen > GetDate() - 30 And tblState.Statename = 'Active' And
tsysAssetTypes.AssetTypename Like 'Windows%'
Order By tblAssets.Domain,
tblAssets.AssetName