
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 05:52 PM
Error where printers should be listed when clicking specific report:
"Report has an invalid syntax:
Divide by zero error encountered."
Occurs when clicking these reports from the All Available Reports page:
"Printer almost out of toner"
"Printer Toner level"
There are 41 printers showing in the Device list.
This is the Lansweeper 4.1 1/13 version.
Running on Windows XP on a local database using the SQL server free edition.
Printers found by ip scan.
Let me know if there is anything else you need to know.
"Report has an invalid syntax:
Divide by zero error encountered."
Occurs when clicking these reports from the All Available Reports page:
"Printer almost out of toner"
"Printer Toner level"
There are 41 printers showing in the Device list.
This is the Lansweeper 4.1 1/13 version.
Running on Windows XP on a local database using the SQL server free edition.
Printers found by ip scan.
Let me know if there is anything else you need to know.
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 06:19 PM
This fix worked! Thanks for the quick response and solution.
By the way, I'm am very much liking 4.1. Keep up the awesome work!
By the way, I'm am very much liking 4.1. Keep up the awesome work!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 06:15 PM
This sql script should fix the problem:
ALTER VIEW dbo.web40repprinteralmosttoner
AS
Select Top 1000000 tsysDevicetypes.ItemTypeIcon10 As icon,
tblCustDevices.Displayname As [Device name], tblCustDevices.Model As [Device model], tblCustDevices.DeviceKey,
Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100) As [Remaining %], tblCustDevPrinter.Tonername, tblCustDevPrinter.Lastchanged
From tblCustDevices Inner Join
tsysDevicetypes On tsysDevicetypes.ItemType = tblCustDevices.Devicetype
Inner Join
tblCustDevPrinter On tblCustDevPrinter.DeviceKey = tblCustDevices.DeviceKey Where Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100) <= 10 And tblCustDevices.State = 1 And tblCustDevPrinter.TonerMaximum > 0 Order By Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100)
GO
ALTER VIEW dbo.web40reptonerlevel
AS
Select Top 1000000 tsysDevicetypes.ItemTypeIcon10 As icon, tblCustDevices.Displayname As [Device name], tblCustDevices.Model As [Device model], tblCustDevices.DeviceKey, Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100) As [Remaining %], tblCustDevPrinter.Tonername, tblCustDevPrinter.Lastchanged From tblCustDevices Inner Join tsysDevicetypes On tsysDevicetypes.ItemType = tblCustDevices.Devicetype Inner Join tblCustDevPrinter On tblCustDevPrinter.DeviceKey = tblCustDevices.DeviceKey Where tblCustDevices.State = 1 And tblCustDevPrinter.TonerMaximum > 0 Order By Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100)
GO

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 06:00 PM
Certainly, the no. of printers has gone up, because it's currently scanning ip ranges.
I'm too slow.
I'm too slow.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 05:58 PM
Problem confirmed, this happens when the "tonermaximum" value is "0"

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2011 05:54 PM
Can you provide a screenshot of this please.
