‎06-19-2020 01:07 AM
Select Top 1000000 tblAssetCustom.Model,
tblCustDevPrinter.TonerRemaining As [Copies Left]
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.TonerColorName,
tblCustDevPrinter.Tonername,
tblCustDevPrinter.TonerMaximum
Order By tblAssetCustom.Model
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
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,
‎03-29-2023 09:37 PM
Use the first bit of code in the Chart: Toner Level area, making sure to label the report as Chart: first, then when adding the widget to the dashboard, pick chart and add the appropriate chart.
Easy peasy.
‎03-29-2023 09:38 PM
I got the chart to work but doesnt show the bars just numbers on the chart.
‎03-29-2023 09:41 PM
Here's a screenshot of my chart parameters.
‎03-29-2023 09:24 PM
How do you make the chart?
‎03-24-2023 07:51 PM
‎03-27-2023 08:40 PM
Not sure what happened but the report seems to be missing the last 8 lines. Here's the correct report...
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]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now