→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
poweld1
Champion Sweeper
I've upgraded to v. 6.0.230.45 and can see this error message when I try opening up the "OS: Not latest Build of Windows 10" report.

Error: Conversion failed when converting the varchar value '523790R2' to data type int.

1 ACCEPTED SOLUTION
Esben_D
Lansweeper Employee
Lansweeper Employee
Hey guys, while we are working on releasing the fix for this issue, you can do the following to get the report working now:

  • Open the report.
  • Hit Edit Report on the left.
  • Replace the query at the bottom of the report builder with the one below.
  • Hit Save & Run.
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
tblAssets.Version As [OS Version],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tsysOS.OSname = 'Win 10' And tblAssetCustom.State = 1 And
tblAssets.BuildNumber Is Not Null And
(Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''), 'R',
'') As int) Not In (Select Max(Cast(Replace(Replace(tsysOS.OScode, '.', ''),
'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18) Or tblAssets.BuildNumber Not In (Select
Max(Cast(tblAssets.BuildNumber As Int)) From tblAssets
Where Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''),
'R', '') As int) In (Select Max(Cast(Replace(Replace(tsysOS.OScode,
'.', ''), 'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18)))
Order By tblAssets.AssetName

View solution in original post

6 REPLIES 6
jspencer
Engaged Sweeper
I believe this is the correct version for the Server 2016 report:

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
tblAssets.Version As [OS Version],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tsysOS.OSname = 'Win 2016' And tblAssetCustom.State = 1 And
tblAssets.BuildNumber Is Not Null And
(Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''), 'R',
'') As int) Not In (Select Max(Cast(Replace(Replace(tsysOS.OScode, '.', ''),
'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 19) Or tblAssets.BuildNumber Not In (Select
Max(Cast(tblAssets.BuildNumber As Int)) From tblAssets
Where Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''),
'R', '') As int) In (Select Max(Cast(Replace(Replace(tsysOS.OScode,
'.', ''), 'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 19)))
Order By tblAssets.AssetName
Esben_D
Lansweeper Employee
Lansweeper Employee
Hey guys, while we are working on releasing the fix for this issue, you can do the following to get the report working now:

  • Open the report.
  • Hit Edit Report on the left.
  • Replace the query at the bottom of the report builder with the one below.
  • Hit Save & Run.
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
tblAssets.Version As [OS Version],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tsysOS.OSname = 'Win 10' And tblAssetCustom.State = 1 And
tblAssets.BuildNumber Is Not Null And
(Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''), 'R',
'') As int) Not In (Select Max(Cast(Replace(Replace(tsysOS.OScode, '.', ''),
'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18) Or tblAssets.BuildNumber Not In (Select
Max(Cast(tblAssets.BuildNumber As Int)) From tblAssets
Where Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''),
'R', '') As int) In (Select Max(Cast(Replace(Replace(tsysOS.OScode,
'.', ''), 'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18)))
Order By tblAssets.AssetName
pfenton
Engaged Sweeper III
Charles.X wrote:
Hey guys, while we are working on releasing the fix for this issue, you can do the following to get the report working now:

  • Open the report.
  • Hit Edit Report on the left.
  • Replace the query at the bottom of the report builder with the one below.
  • Hit Save & Run.
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
tblAssets.Version As [OS Version],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tsysOS.OSname = 'Win 10' And tblAssetCustom.State = 1 And
tblAssets.BuildNumber Is Not Null And
(Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''), 'R',
'') As int) Not In (Select Max(Cast(Replace(Replace(tsysOS.OScode, '.', ''),
'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18) Or tblAssets.BuildNumber Not In (Select
Max(Cast(tblAssets.BuildNumber As Int)) From tblAssets
Where Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''),
'R', '') As int) In (Select Max(Cast(Replace(Replace(tsysOS.OScode,
'.', ''), 'S', '') As int)) From tsysOS
Where tsysOS.Sortorder = 18)))
Order By tblAssets.AssetName


I like this report, but right now it thinks 10.0.17763.55 is the higher build number over 10.0.17763.168, or 10.0.17763.134. Is there a way to fix this?
bhermsen
Engaged Sweeper II
poweld1 wrote:
I've upgraded to v. 6.0.230.45 and can see this error message when I try opening up the "OS: Not latest Build of Windows 10" report.

Error: Conversion failed when converting the varchar value '523790R2' to data type int.



Glad I'm not the only one seeing this. I'm seeing it for Server 2016 as well.
abetzold
Engaged Sweeper III
poweld1 wrote:
I've upgraded to v. 6.0.230.45 and can see this error message when I try opening up the "OS: Not latest Build of Windows 10" report.

Error: Conversion failed when converting the varchar value '523790R2' to data type int.



Same issue here
David_G
Lansweeper Employee
Lansweeper Employee
I would recommend to send in an email to our support team to troubleshoot this issue further on. You can send an email to support@lansweeper.com and provide our staff with the following information:
  • Program Files (x86)\Lansweeper\Service\Errorlog.txt, as present on your Lansweeper server
  • A screenshot of the error that you are facing