cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
harringg
Champion Sweeper
When viewing an IP Locations Overview report (our printers all have a common third octet), it sorts "logically".

xx.xxx.123.1
xx.xxx.123.2
...
xx.xxx.123.9
xx.xxx.123.10

When creating a custom report to report on other items about the printers (since the IP LO report is generic in nature), it sorts like this.

xx.xxx.123.1
xx.xxx.123.10
xx.xxx.123.2
xx.xxx.123.3
...

The current code I'm using is below, is there a modification that will allow for the sorting in the first example?

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssetCustom.Location,
tblAssetCustom.Building,
tblAssetCustom.Department
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.IPAddress Like '%.123.%' And tblAssetCustom.State = 1
Order By tblAssets.IPAddress


Also, which table is the Mask (SubnetMask) field located?
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
You need to use tblassets.ipnumeric to sort in sql code.

View solution in original post

6 REPLIES 6
harringg
Champion Sweeper
Thanks. I added those fields and it gave me the information I needed. Below is the working report in case anyone is interested.

This allowed me to quickly ID which printers needed configuring and I was able to remotely update the settings.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssetCustom.Location,
tblAssetCustom.Building,
tblAssetCustom.Department,
tblSNMPInfo.IfIPAddress,
tblSNMPInfo.IfMask,
tblSNMPInfo.IfType
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSNMPInfo On tblAssets.AssetID = tblSNMPInfo.AssetID
Where tblAssets.IPAddress Like '%.123.%' And tblSNMPInfo.IfType = 6 And
tblSNMPInfo.IfType = 6 And tblAssetCustom.State = 1
Order By tblAssets.IPNumeric
harringg
Champion Sweeper
I'm refering to the Mask field in the attached screenshot. I looked in the Network tables and didn't see it. It's grabbing a value from somewhere, I'd like to add that to my reports to ensure at a glance that all the printers are properly configured, without having to click on each printer in the list.
Hemoco
Lansweeper Alumni
harringg wrote:
I'm refering to the Mask field in the attached screenshot. I looked in the Network tables and didn't see it. It's grabbing a value from somewhere, I'd like to add that to my reports to ensure at a glance that all the printers are properly configured, without having to click on each printer in the list.

Our apologies, this information was actually added in 5.0. The table you need is tblSNMPInfo.
Hemoco
Lansweeper Alumni
You need to use tblassets.ipnumeric to sort in sql code.
harringg
Champion Sweeper
Lansweeper wrote:
You need to use tblassets.ipnumeric to sort in sql code.


Got that working, sorted by that field and then had it hidden.

Which table is the Mask(Subnet Mask)record in for the Printers?

Thanks
Hemoco
Lansweeper Alumni
harringg wrote:
Which table is the Mask(Subnet Mask)record in for the Printers?

This information is not currently scanned for non-Windows machines.