10-17-2024 11:45 PM - edited 10-17-2024 11:46 PM
I just wanted to edit the widget mentioned in the title, so that it would only show me Windows device types and Monitors. After doing some research, I found that widgets (charts) are fed by Lansweeper's built-in reports, and I found the one I was looking for, called "Chart: Asset type summary." In it, I simply deactivated the "AssetTypename" field from the "tsysAssetTypes" table. After doing this, the main chart no longer shows the pie chart that used to display normally. However, the legend is still displayed correctly, showing the count of device types.
I didn't modify or alter the code; it was just that simple click on the "AssetTypename" field. But even after reactivating it, the widget never worked properly again. Curiously, if I edit the widget and change the type of report it shows, like "Asset manufacturer," the widget works properly again. Clearly, this must be because "Asset manufacturer" is pointing to a different report, which I haven't touched (and obviously don't want to).
The code is unaltered, so I can't understand why this mess happens :C
Select Top 1000000 Count(tblAssets.AssetID) As Total,
tsysAssetTypes.AssetTypename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Where tblAssetCustom.State = 1 And tblAssets.Assettype <> 66
Group By tsysAssetTypes.AssetTypename
Order By Total Desc
Solved! Go to Solution.
10-18-2024 10:12 AM
Select Top 1000000 tsysAssetTypes.AssetTypename,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Where tblAssetCustom.State = 1 And tblAssets.Assettype <> 66
Group By tsysAssetTypes.AssetTypename
Order By Total Desc
10-18-2024 01:47 PM
Many many thanks!
You save my job 🙏
10-18-2024 10:12 AM
Select Top 1000000 tsysAssetTypes.AssetTypename,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Where tblAssetCustom.State = 1 And tblAssets.Assettype <> 66
Group By tsysAssetTypes.AssetTypename
Order By Total Desc
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now