→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sullivane
Champion Sweeper III
I am still unable to get a grasp on the reports feature.

Can someone help me make a report that shows all the monitors that are attached to computers that are set to something other than active?

Thank you
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
You can add the asset tables for both the monitor and the computer to your report and define what you would like to see. The relation between assets and other assets connected to them is stored in table tblAssetRelations. Please find a report below which lists computers in a state other than active which have a monitor asset connected to them in active state.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen,
tblAssets.Lasttried,
tMonitor.AssetName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tblAssets tMonitor
On tMonitor.AssetID = tblAssetRelations.ChildAssetID
Inner Join tblAssetCustom tMonitorCustom On tMonitorCustom.AssetID =
tMonitor.AssetID
Where tblAssetRelations.Type = 3 And tblAssetCustom.State <> 1 And
tMonitorCustom.State = 1
Order By tblAssets.AssetName,
tMonitor.AssetName

View solution in original post

6 REPLIES 6
Daniel_B
Lansweeper Alumni
Mass change directly on the output of a report is not currently supported. You could either export the assets and afterwards open Assets, filter for them and change the state or use a database script which changes the asset state on the monitors listed by the report. However, we don't offer support for creation of database scripts.
sullivane
Champion Sweeper III
Nevermind that last. It seems, when you set an alias, it disables the asset as clickable. I changed the alias from the monitor to the computer, and not the monitor is clickable.

However, how can I mass edit these monitors now to change the state?
sullivane
Champion Sweeper III
That seems better. Right now, however the computer seems to be the main focus and is clickable, can I switch that to the monitor instead?

This is meant to be about the monitor not the computer 🙂

Thank you guys for all your help.
Susan_A
Lansweeper Alumni
Enter an alias (custom column name) for one of the AssetName expressions into the Alias column of the report builder. The builder is complaining that there are two columns with the same name in the report output.

The Lansweeper report builder is a standard SQL editor. Reviewing some SQL tutorials and using the database dictionary will make building and modifying reports a lot easier.
sullivane
Champion Sweeper III
I get:

Error while saving: "Column names in each view or function must be unique. Column name 'AssetName' in view or function 'web50rep0ec253c5f570488cb4a139f927659aff' is specified more than once."


When saving
Daniel_B
Lansweeper Alumni
You can add the asset tables for both the monitor and the computer to your report and define what you would like to see. The relation between assets and other assets connected to them is stored in table tblAssetRelations. Please find a report below which lists computers in a state other than active which have a monitor asset connected to them in active state.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen,
tblAssets.Lasttried,
tMonitor.AssetName
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tblAssets tMonitor
On tMonitor.AssetID = tblAssetRelations.ChildAssetID
Inner Join tblAssetCustom tMonitorCustom On tMonitorCustom.AssetID =
tMonitor.AssetID
Where tblAssetRelations.Type = 3 And tblAssetCustom.State <> 1 And
tMonitorCustom.State = 1
Order By tblAssets.AssetName,
tMonitor.AssetName

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now