→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SEC_ALERTS
Engaged Sweeper
Hi Team,

We need report for dual(One machine having two monitored connected) monitor.
I have some machine in my LAN with single machine and two monitor connected to it.
based on this information we required report in below format.

Monitor name
Monitor make
Monitor serial no
monitor count(weather one or two)

Thanks in Advance!!

Regards,
SEC_ALERTS
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
The report below gives you an overview of all Windows computers and their monitors as requested.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Lastseen,
tblMonitor.MonitorModel,
tblMonitor.MonitorManufacturer,
tblMonitor.ManufacturedDate,
tblMonitor.SerialNumber,
Count(tblA.MonitorID) As NrOfMonitors,
tsysAssetTypes.AssetTypeIcon16 As icon
From tblMonitor As tblA
Right Join tblAssets On tblAssets.AssetID = tblA.AssetID
Left Join tblMonitor On tblAssets.AssetID = tblMonitor.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.Assettype = -1
Group By tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Lastseen,
tblMonitor.MonitorModel,
tblMonitor.MonitorManufacturer,
tblMonitor.ManufacturedDate,
tblMonitor.SerialNumber,
tsysAssetTypes.AssetTypeIcon16

View solution in original post

5 REPLIES 5
ghough
Engaged Sweeper
Great! Thank you! That did it and I learned stuff.
Hemoco
Lansweeper Alumni
The error explains the problem. TblAssets.Username isn't included in the GROUP BY clause. Tick the Grouping checkbox for the tblAssets.Username expression.
ghough
Engaged Sweeper
Thanks for this report!

I was able to successfully modify the report to show only computers with 2 or more monitors, but since my Asset names don't usually match up with the users using these computers I was trying to add 'Username' from 'Tblassets'. Doing this gave me the following error message:

Column 'tblAssets.Username' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.


Is there another way to achieve the results I am looking for?

Thanks again!
SEC_ALERTS
Engaged Sweeper
Many Thanks !!!
Hemoco
Lansweeper Alumni
The report below gives you an overview of all Windows computers and their monitors as requested.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Lastseen,
tblMonitor.MonitorModel,
tblMonitor.MonitorManufacturer,
tblMonitor.ManufacturedDate,
tblMonitor.SerialNumber,
Count(tblA.MonitorID) As NrOfMonitors,
tsysAssetTypes.AssetTypeIcon16 As icon
From tblMonitor As tblA
Right Join tblAssets On tblAssets.AssetID = tblA.AssetID
Left Join tblMonitor On tblAssets.AssetID = tblMonitor.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.Assettype = -1
Group By tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Lastseen,
tblMonitor.MonitorModel,
tblMonitor.MonitorManufacturer,
tblMonitor.ManufacturedDate,
tblMonitor.SerialNumber,
tsysAssetTypes.AssetTypeIcon16