‎12-18-2023 03:10 PM - last edited on ‎04-01-2024 12:33 PM by Mercedes_O
Hello.
I'm trying to create a report for custom Assets/State type.
I have a Asset Group with 49 Assets but my report is showing only 5/49 assets.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Location,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssets.Mac,
tblAssetCustom.Custom1,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssetUserRelations.Username,
tblAssetUserRelations.StartDate,
tblAssetUserRelations.EndDate,
tblAssets.Description,
tblAssetUserRelations.Comments,
tblState.Statename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetUserRelations On
tblAssets.AssetID = tblAssetUserRelations.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Where tsysAssetTypes.AssetTypename Like 'Tablet'
Order By tblAssets.AssetName
Any idea?
‎12-20-2023 05:56 PM
Didn't work here
‎12-18-2023 09:10 PM
I removed the tblAssetUserRelations database and the query worked for me. Before I removed it I was only seeing assets that had a date in the tblAssetUserRelations.StarteDate field. If you want to see the last logged on user use the tblassets.username field.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now