Notification

Icon
Error

How to Report on Dynamic Asset Groups

Posted: Friday, November 15, 2019 11:49:22 AM(UTC)
Rob-CD

Rob-CD

Member Original PosterPosts: 25
0
Like
Good Morning,

Please would I be able to ask how I best report on the different Dynamic Asset Groups?

I want to be able to initially pull a basic report on each to be shown on a custom dashboard to be built.

Many thanks,
Rob



Rob-CD
#1Rob-CD Member Original PosterPosts: 25  
posted: 11/20/2019 10:39:18 AM(UTC)
Good Morning Everyone,

Please would I be able to reach out again if anyone is able to offer any assistance on my query?

Specifically I'm needing to report on which assets are 'Active' and which aren't. And build a dashboard around it. I've already got a data report widget working for 'Active' and 'Non-Active' assets, but I also want to have similar working widgets for 2 other custom status' I've setup. It's these 2 new custom status' I'm not sure where in the report builder where I would need to add the relevant piece of script to create a report for each of these.

Any help would be very much appreciated.

Cheers,
Rob
RC62N
#2RC62N Member Posts: 392  
posted: 11/20/2019 6:24:56 PM(UTC)
According to a message in this thread from 2015, reporting on dynamic groups is not possible.

Quote:
Using Dynamic Asset groups for reports is not possible. In fact, through custom reports you can do everything what you can do with dynamic asset groups (plus much more).
Rob-CD
#3Rob-CD Member Original PosterPosts: 25  
posted: 11/21/2019 10:06:30 AM(UTC)
Thanks for that information.

I thought it would be possible, as I've already using the below report scripts been able to pull basic reports out on assets with the dynamic state 'Active', and assets with the dynamic state 'Non-active'.

Active:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1

Non-active:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 2

Where all I've changed is the number within the line 'Where tblAssetCustom.State = Number'. With 1 being for Active assets and 2 being for Non-Active assets. I'd assumed any other dynamic groups would also have a number but that doesn't seem to work for 2x other dynamic asset groups I've setup called 'Recycled' and 'Returned to Supplier'.

Looking at the options with the 'Assets' tab in Lansweeper I've also noticed the sub header of 'Asset States'.

Would anyone know if you can report off 'Asset States' if there is no way to report from dynamic groups so well?

Thanks,
Rob
RC62N
#4RC62N Member Posts: 392  
posted: 11/21/2019 6:23:35 PM(UTC)
If you want to see a list of the states and the values representing them, run a list of the contents of tblState.
Code:
SELECT *
FROM tblstate

If you want to include the state names on your reports (and filter on the names rather than the values representing them), add tblState to your report and add tblState.Statename to your column selection.
Rob-CD
#5Rob-CD Member Original PosterPosts: 25  
posted: 11/22/2019 9:30:29 AM(UTC)
Thanks for the additional information.

I've managed initially to get the basic report working that I wanted to, by working out the 2x new custom Asset States I'd created were number '10' and '11', so I just needed to in each report change the number in the below line:

Where tblAssetCustom.State = 2

I'd found an old question on here, where someone had stated what numbers related to each pre-built in asset state and from that could work out any new ones created started from 10 upwards.

I have also saved a report template to bring up the asset state valves as you've provided.

Thanks again for your help.

Cheers,
Rob

Active Discussions

Lansweeper Software Missing Report
by  RC62N   Go to last post Go to first unread
Last post: 12/6/2019 6:09:28 PM(UTC)
Lansweeper Assets without Asset Location
by  JLangthaler  
Go to last post Go to first unread
Last post: 12/5/2019 12:44:19 PM(UTC)
Lansweeper Installed Memory report
by  lansend   Go to last post Go to first unread
Last post: 12/2/2019 8:15:53 PM(UTC)
Lansweeper Custom OID Report
by  bramassendorp  
Go to last post Go to first unread
Last post: 12/2/2019 4:42:48 PM(UTC)
Lansweeper Report thats showing Windows machines when AV is not like =
by  RC62N   Go to last post Go to first unread
Last post: 11/28/2019 5:56:51 PM(UTC)
Lansweeper dhcp addresses available
by  Cesco93   Go to last post Go to first unread
Last post: 11/28/2019 2:56:02 PM(UTC)
Lansweeper All Assets Report on all IP-addresses and MAC-addresses
by  Tommy75  
Go to last post Go to first unread
Last post: 11/27/2019 11:54:44 AM(UTC)