A sample report can be seen below. It lists your computers, their last logged on user and their "used by" user relations. We also added a column that indicates whether or not the last logged on user is different from the user relation. To use the report below, do the following:
•Open the report builder under Reports/Create New Report.
•Paste the SQL code we provided at the bottom of the page.
•Left-click somewhere in the upper section of the page so the code applies.
•Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Username As LastLogonUser,
tblAssets.Userdomain As LastLogonDomain,
tblAssetUserRelations.Username As RelationUser,
tblAssetUserRelations.Userdomain As RelationDomain,
tblAssets.Firstseen,
tblAssets.Lastseen,
Case When tblAssets.Username <> tblAssetUserRelations.Username Or
tblAssets.Userdomain <> tblAssetUserRelations.Userdomain Then 'different'
Else 'same' End As UserComparison
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetUserRelations On tblAssets.AssetID =
tblAssetUserRelations.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetUserRelations.Type
Where tsysAssetRelationTypes.Name = 'used by' And tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName