Notification

Icon
Error

Report comes up empty - Trying to run a report I found on this site but it returns no results.

Posted: Friday, April 12, 2019 5:17:00 PM(UTC)
Rob Miller

Rob Miller

Member Original PosterPosts: 3
0
Like
I am trying to run a report to show all printers installed to workstations but it is coming up empty. This is the report as I found it. Basically I just copied this code as found here to a new report. What am I doing wrong?


Quote:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblPrinters.Caption As Printer,
tblPrinters.Portname As PrinterPort,
tblPrinters.Printprocessor,
tblPrinters.Capabilitydescriptions As PrinterCapabilities,
tblPrinters.Lastchanged
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblPrinters On tblAssets.AssetID = tblPrinters.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblPrinters.Printprocessor <> 'WinPrint' And Case tblPrinters.Network
When 0 Then 'No' When 1 Then 'Yes'
End = 'Yes' And tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName,
Printer

JacobH
#1JacobH Member Posts: 164  
posted: 4/12/2019 8:52:42 PM(UTC)
To troubleshoot, generally you whittle down the WHERE clause to see if you have any base results.

I did that, and noticed it was the tblprinter.network check - i did a select from that table, and noticed all of my entries in there say 0. So, I assume it's not what I think it is, nor reliable for anything, so I removed it from the WHERE clause

Code:
Where tblPrinters.Printprocessor <> 'WinPrint' 
And tblState.Statename = 'Active'


change it to that, and you should get results.
Rob Miller
#2Rob Miller Member Original PosterPosts: 3  
posted: 4/13/2019 12:17:17 AM(UTC)
Originally Posted by: JacobH Go to Quoted Post
To troubleshoot, generally you whittle down the WHERE clause to see if you have any base results.

I did that, and noticed it was the tblprinter.network check - i did a select from that table, and noticed all of my entries in there say 0. So, I assume it's not what I think it is, nor reliable for anything, so I removed it from the WHERE clause

Code:
Where tblPrinters.Printprocessor <> 'WinPrint' 
And tblState.Statename = 'Active'


change it to that, and you should get results.


Thank you! That did it!

Active Discussions

Lansweeper MouseJack vulnerability affected devices report
by  Viper   Go to last post Go to first unread
Last post: Yesterday at 5:19:14 PM(UTC)
Lansweeper TPM support
by  Sander Eerdekens  
Go to last post Go to first unread
Last post: Yesterday at 1:38:17 PM(UTC)
Lansweeper Report of all AD users and disabled/enabled status
by  Sandro   Go to last post Go to first unread
Last post: Yesterday at 11:36:49 AM(UTC)
Lansweeper report of workstation with 2nd screen
by  Esben.D  
Go to last post Go to first unread
Last post: 7/12/2019 12:43:16 PM(UTC)
Lansweeper Lansweeper warnings sent to an email
by  MilicaM   Go to last post Go to first unread
Last post: 7/12/2019 10:36:44 AM(UTC)
Lansweeper Number of users in a group
by  matt steele  
Go to last post Go to first unread
Last post: 7/12/2019 10:34:17 AM(UTC)
Lansweeper Report of assets names behind switches/routers
by  dsimonspan   Go to last post Go to first unread
Last post: 7/11/2019 10:41:17 AM(UTC)
Lansweeper Intel SSD and Processor Diagnostic Tool Vulnerability
by  Esben.D  
Go to last post Go to first unread
Last post: 7/11/2019 8:24:34 AM(UTC)