Asset types are stored in
tsysassettypes.assettypename. In order to differentiate Windows servers, desktops and laptops, you'll need to use a case statement which checks
tblComputersystem.Domainrole (bigger than 1 for servers) and if the computer has an entry in
tblPortableBattery:
Select Top 1000000 tsysIPLocations.IPLocation,
tAssettype.[asset type],
Count(tblAssets.AssetID) As number
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblAssets.AssetID,
Case When tblAssets.Assettype = -1 Then Case
When tblComputersystem.Domainrole > 1 Then 'Server' Else Case
When Coalesce(tblPortableBattery.AssetID, 0) <> 0 Then 'Laptop'
Else 'Desktop' End End Else tsysAssetTypes.AssetTypename
End As [asset type]
From tblAssets
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblComputersystem On tblComputersystem.AssetID = tblAssets.AssetID
Left Join tblPortableBattery On tblPortableBattery.AssetID =
tblAssets.AssetID) tAssettype On tAssettype.AssetID = tblAssets.AssetID
Left Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Where tblAssetCustom.State = 1
Group By tsysIPLocations.IPLocation,
tAssettype.[asset type]
Order By tsysIPLocations.IPLocation,
tAssettype.[asset type]
A total count needs to be made additionally to this report, or by a second report like the one here but without tAssettype.