Moved your forum topic to the report questions section.
tblAssets.Domain contains the domain or workgroup name. If you would like to report on all Windows computers, you only need to filter on
tblAssets.Assettype. It will be -1 for Windows computers. Please find an example report below.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Case When tblComputersystem.Domainrole > 1 Then 'Server' Else Case
When Coalesce(tblPortableBattery.AssetID, 0) = 0 Then 'Desktop/Unknown'
Else 'Laptop' End End As Type,
tblOperatingsystem.Caption As OS,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tblPortableBattery On tblAssets.AssetID = tblPortableBattery.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblAssetCustom.State = 1 And tsysAssetTypes.AssetType = -1
Order By tblAssets.Domain,
tblAssets.AssetName