→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MR1371
Engaged Sweeper II
Hello,

I am having trouble getting a custom report to just display the Windows asset type name. When I go in to edit the report, I make the asset type name criteria = "Windows" Is this not the proper way to do this? I have tried a few other ways but everything either shows nothing, or shows Windows as well as other asset type names.
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Asset type names are stored in the system table tsysAssettypes. You can filter for Windows assets either by filtering on tblAssets.Assettype = -1 or by adding tsysAssettypes to your report and filtering on tsysAssettypes.AssettypeName = 'Windows'. Please find an example below.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename = 'Windows' And tblAssetCustom.State = 1
Order by tblAssets.Assetname

View solution in original post

1 REPLY 1
Daniel_B
Lansweeper Alumni
Asset type names are stored in the system table tsysAssettypes. You can filter for Windows assets either by filtering on tblAssets.Assettype = -1 or by adding tsysAssettypes to your report and filtering on tsysAssettypes.AssettypeName = 'Windows'. Please find an example below.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename = 'Windows' And tblAssetCustom.State = 1
Order by tblAssets.Assetname