‎11-19-2018 08:39 PM
Select Top 1000000 tsysOS.Image As Icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.IPAddress As IP,
tblPrinters.Caption As Printer,
tblPrinters.Portname As [Printer Port],
tblPrinters.Capabilitydescriptions As [Printer Capabilities],
tblPrinters.Lastchanged,
tblAssets.Username
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblPrinters On tblAssets.AssetID = tblPrinters.AssetID
Where (tblPrinters.Portname Like 'DOT4%' Or tblPrinters.Portname Like 'USB%')
And tblPrinters.Local = 1
Order By tblAssets.Domain,
tblAssets.AssetName,
Printer
‎04-23-2021 01:29 AM
Select Top 1000000 tblAssetCustom.Model,
tblCustDevPrinter.TonerRemaining As [Copies Left],
tblCustDevPrinter.TonerMaximum As [Max. Copies],
Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) As [Remaining %],
tblCustDevPrinter.Tonername As [Reorder #],
tblCustDevPrinter.TonerColorName As Color,
tblAssets.IPAddress,
Case
When (tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) <= 10 Then 'red'
End As foregroundcolor,
Case
When (tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) <= 10 Then 'yellow'
End As backgroundcolor,
tblAssetCustom.SnmpOID,
tblAssetCustom.Printedpages,
tblAssetCustom.Printerstatus
From tblCustDevPrinter
Inner Join tblAssets On tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Where tblCustDevPrinter.TonerRemaining >= 0 And tblCustDevPrinter.TonerMaximum >
0 And tblAssetCustom.State = 1
Group By tblAssetCustom.Model,
tblCustDevPrinter.TonerRemaining,
tblCustDevPrinter.TonerMaximum,
tblCustDevPrinter.Tonername,
tblCustDevPrinter.TonerColorName,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.SnmpOID,
tblAssetCustom.Printedpages,
tblAssetCustom.Printerstatus
Order By tblAssetCustom.Model,
[Copies Left]
‎04-23-2021 04:15 PM
‎04-22-2021 06:49 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now