cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CVCO
Engaged Sweeper III
In our Lansweeper v. 6.0.151.34 deployment the built in "Windows: Installed network printers" report only has 1 single entry from a desktop last seen in 2016 for some reason when it should have closer to a couple thousand active entries based on the number of users and mapped network printers we have. The built in "Windows: Installed local printers" report has around 2500 entries populated. Suggestions are appreciated. This is the current code from our network printers report:



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
10 REPLIES 10
Mister_Nobody
Honored Sweeper II

If info is not collected then it is not problem of reporting...

Mister_Nobody
Honored Sweeper II

We wrote some reports

Local-connected printers

Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.IPAddress,
  tblAssets.Userdomain,
  tblAssets.Username,
  tblPrinters.Caption,
  tblPrinters.Portname,
  tblAssets.Firstseen,
  tblAssets.Lastseen,
  tblPrinters.Lastchanged,
  tblPrinters.Status,
  tblPrinters.Printprocessor
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblPrinters On tblAssets.AssetID = tblPrinters.AssetID
Where (tblPrinters.Portname Like 'USB%' Or tblPrinters.Portname Like 'LPT%' Or
    tblPrinters.Portname Like 'COM%' Or tblPrinters.Portname Like 'DOT4%' Or
    tblPrinters.Portname Like '%.%.%.%') And tblAssetCustom.State = 1
Order By tblAssets.AssetName

All Printers:

Select Top 1000000 tblAssets.AssetName,
  tblAssets.Username,
  tblAssets.Lastseen,
  tblPrinters.*
From tblAssets
  Inner Join tblPrinters On tblAssets.AssetID = tblPrinters.AssetID
Where Not tblPrinters.Portname Like 'PORTPROMPT:' And
  Not tblPrinters.Caption Like '%XPS%' And Not tblPrinters.Caption Like '%Fax%'
  And Not tblPrinters.Caption Like '%OneNote%' And
  Not tblPrinters.Caption Like '%Document%' And Not Lower(tblPrinters.Caption)
  Like '%pdf%' And Not Lower(tblPrinters.Portname) Like '%port:%'

Network Printer Connection:

Select Top 1000000 tblAssets1.AssetID,
  tblAssets1.AssetName,
  tblAssets1.IPAddress,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tblPrinters.Caption,
  tblPrinters.Portname,
  tblAssets.AssetName CompName,
  tblAssets.IPAddress CompIP,
  tblAssets.Username,
  tblAssets.FQDN
From tblPrinters
  Inner Join tblAssets On tblAssets.AssetID = tblPrinters.AssetID
  Inner Join tblAssets As tblAssets1 On (tblPrinters.Portname Like '%' +
        tblAssets1.IPAddress + '%' Or
        tblPrinters.Portname Like tblAssets1.AssetName + '%' Or
        tblAssets1.AssetName Like tblPrinters.Portname + '%' Or
        tblAssets1.AssetName = tblPrinters.Portname)
  Inner Join tblAssetCustom On tblAssets1.AssetID = tblAssetCustom.AssetID
Where tblAssets1.IPAddress <> '' And tblAssets1.Assettype = 16
Order By tblAssets1.AssetName

or if need then add fix domain name
Inner Join tblAssets As tblAssets1 On (tblPrinters.Portname Like '%' +
tblAssets1.IPAddress + '%' Or
tblPrinters.Portname Like tblAssets1.AssetName + '%domain_suffix' Or
tblAssets1.AssetName Like tblPrinters.Portname + '%domain_suffix' Or
tblAssets1.AssetName = tblPrinters.Portname)

TVM, but I don't think ANY of them give the printers mapped at the PC side. Which is what I am trying to gather... I'm not sure that LanSweeper gathers this info....

Esben_D
Lansweeper Employee
Lansweeper Employee
I think your report is still the original. You can find a copy of every report we have on the forum. The network printer report can be found here: https://www.lansweeper.com/forum/yaf_postst15179_Windows--Installed-network-printers--Built-in.aspx#post51429

The condition I was referred to filters out all printers which use Microsoft's default print processor. Usually printers install their own print processor when the driver is installed. However, since this might not be the case in your network, removing the line might show you the results you are looking for. If there is too much information, you can always look for other ways of filtering out unwanted information.
CVCO
Engaged Sweeper III
Charles.X wrote:
I think your report is still the original. You can find a copy of every report we have on the forum. The network printer report can be found here: https://www.lansweeper.com/forum/yaf_postst15179_Windows--Installed-network-printers--Built-in.aspx#post51429

The condition I was referred to filters out all printers which use Microsoft's default print processor. Usually printers install their own print processor when the driver is installed. However, since this might not be the case in your network, removing the line might show you the results you are looking for. If there is too much information, you can always look for other ways of filtering out unwanted information.



Good feedback. I modified the report to exclude the below lines and now have 14,000 results which is much better but still incomplete:


Where tblPrinters.Printprocessor <> 'WinPrint' And Case tblPrinters.Network
When 0 Then 'No' When 1 Then 'Yes'
End = 'Yes' And tblState.Statename = 'Active'


The modified report presents local usb or parallel printers and network printers where the printer instance in the user's devices & printers was installed via the standard tcp/ip setup pointed directly at the printer ip but the report seems to be missing user printer instances that were added as a mapping to a shared printer on a server. As an example this would include printers created when user browses \\servername from their desktop, right clicks a shared printer they want to use, selects "Connect...", and the printer then installs and populates in their devices & printers list. If I type "\\" in the Printer column of the report to search for unc mappings it does turn up about 5 recent active printers but this is a very small fraction of the total instances known to be out there so these few must have been installed in an unconventional manner that allows them to be picked up. Any suggestions?
Esben_D
Lansweeper Employee
Lansweeper Employee
In this case, Windows decides whether a printer is a Network printer or not. This property is store in the Win32_Printer WMI class, which is where Lansweeper retrieves the information from.

The most likely case why there is no information displayed is because of this condition: tblPrinters.Printprocessor <>
'WinPrint'


The information is stored tblPrinters, so you can always see if you can create a custom report which lists the devices you need.

Argon0
Champion Sweeper

This report is also not working for me - I KNOW I have mapped network printers - e.g. my PC has several. BUT this report is showing nothing. There is also nothing (except 

Argon0_0-1689758235889.png) in the PC properties/Device section. IF I remove the section mentioned above it just shows these printers (except it doesn't show cabin printer (a network printer mapped directly to my PC) and not the others mapped to my PC (e.g. :

Argon0_2-1689758434153.png)

 

Any ideas? TVM

 

CVCO
Engaged Sweeper III
Charles.X wrote:
In this case, Windows decides whether a printer is a Network printer or not. This property is store in the Win32_Printer WMI class, which is where Lansweeper retrieves the information from.

The most likely case why there is no information displayed is because of this condition: tblPrinters.Printprocessor <>
'WinPrint'


The information is stored tblPrinters, so you can always see if you can create a custom report which lists the devices you need.




Thanks. Can you provide the correct code for this built in report so I can try that against the code in ours in case it was modified?
CyberCitizen
Honored Sweeper
I also have the same, but what I do is go to Assets > Asset Type > Printers and find the ones I need there.

Or Under the reports, device Printer status. For some reason that report you mention returns no results for me, not sure if the report needs to be rebuilt.