cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Daniel_B
Lansweeper Alumni
Old name: Device: Printer almost out of toner (Built-in)

The report below lists printers with low toner level

The report will only list assets that meet all of the following criteria:
  • The asset state is set to "active".
  • The asset type is set to 'Printer'.
  • The toner level data is available
  • The toner level below 10%


SELECT
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As AssetType,
tsysAssetTypes.AssetTypeIcon10,
tblAssets.IPAddress,
tsysIPlocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssets.Lasttried,
Cast(tblCustDevPrinter.TonerRemaining As nvarchar) + '%' as RemainingPercentage,
tblCustDevPrinter.TonerMaximum,
tblCustDevPrinter.Tonername,
tblCustDevPrinter.TonerColorName,
tblCustDevPrinter.Lastchanged
FROM tblCustDevPrinter
INNER JOIN tblAssets ON tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
WHERE
tblCustDevPrinter.TonerMaximum <> 0
AND tblCustDevPrinter.TonerRemaining <> 0
AND (FLOOR(tblCustDevPrinter.TonerRemaining / (CASE WHEN tblCustDevPrinter.TonerMaximum = 0 THEN 1 ELSE tblCustDevPrinter.TonerMaximum END) * 100) <= 10)
AND (FLOOR(tblCustDevPrinter.TonerRemaining / (CASE WHEN tblCustDevPrinter.TonerMaximum = 0 THEN 1 ELSE tblCustDevPrinter.TonerMaximum END) * 100) >= 0)
AND (tblCustDevPrinter.TonerMaximum > 0)
AND tblState.Statename = 'Active' And tsysAssetTypes.AssetTypename = 'Printer'
Order By RemainingPercentage, tblAssets.Domain, tblAssets.AssetName
0 REPLIES 0