‎02-13-2020 11:10 PM
Select Top 1000000 tblAssets.AssetID,
tblADusers.Lastname,
tblADusers.Firstname,
tblAssets.AssetUnique,
tblAssets.Domain,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Case tblSoftware.softwareVersion
When '20.2.11.3' Then '2-Current-20.2.1'
When '20.0.0.377' Then '0-Original'
When '20.0.1.2' Then '0A-Original'
When '20.1.0.81' Then '1-20.1'
When '20.2.0.48' Then '2-20.2'
Else 'Unknown'
End As [Service Pack],
tblSoftwareUni.SoftwarePublisher As Autodesk,
tsysOS.Image As icon,
tsysOS.OSname,
tblSoftware.softID As softid,
tblAssets.IPAddress,
tblAssets.IPNumeric
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblSoftwareUni.softwareName Like 'Autodesk Revit 2020' And
tblAssetCustom.State = 1 And tblSoftwareUni.SoftID = 2521
Order By [Service Pack],
tblAssets.AssetName,
Version
Case
When '2-Current-20.2.1' then '#d4f4be'
Else '#ffadad'
End As backgroundcolor
Solved! Go to Solution.
‎02-14-2020 03:12 PM
Select Top 1000000 tblAssets.AssetID,
tblADusers.Lastname,
tblADusers.Firstname,
tblAssets.AssetUnique,
tblAssets.Domain,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Case tblSoftware.softwareVersion
When '20.2.11.3' Then '2-Current-20.2.1'
When '20.0.0.377' Then '0-Original'
When '20.0.1.2' Then '0A-Original'
When '20.1.0.81' Then '1-20.1'
When '20.2.0.48' Then '2-20.2'
Else 'Unknown'
End As [Service Pack],
Case tblSoftware.softwareVersion
When '20.2.11.3' then '#d4f4be'
Else '#ffadad'
End As backgroundcolor,
tblSoftwareUni.SoftwarePublisher As Autodesk,
tsysOS.Image As icon,
tsysOS.OSname,
tblSoftware.softID As softid,
tblAssets.IPAddress,
tblAssets.IPNumeric
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblSoftwareUni.softwareName Like 'Autodesk Revit 2020' And
tblAssetCustom.State = 1 And tblSoftwareUni.SoftID = 2521
Order By [Service Pack],
tblAssets.AssetName,
Version
‎02-14-2020 03:12 PM
Select Top 1000000 tblAssets.AssetID,
tblADusers.Lastname,
tblADusers.Firstname,
tblAssets.AssetUnique,
tblAssets.Domain,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Case tblSoftware.softwareVersion
When '20.2.11.3' Then '2-Current-20.2.1'
When '20.0.0.377' Then '0-Original'
When '20.0.1.2' Then '0A-Original'
When '20.1.0.81' Then '1-20.1'
When '20.2.0.48' Then '2-20.2'
Else 'Unknown'
End As [Service Pack],
Case tblSoftware.softwareVersion
When '20.2.11.3' then '#d4f4be'
Else '#ffadad'
End As backgroundcolor,
tblSoftwareUni.SoftwarePublisher As Autodesk,
tsysOS.Image As icon,
tsysOS.OSname,
tblSoftware.softID As softid,
tblAssets.IPAddress,
tblAssets.IPNumeric
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblSoftwareUni.softwareName Like 'Autodesk Revit 2020' And
tblAssetCustom.State = 1 And tblSoftwareUni.SoftID = 2521
Order By [Service Pack],
tblAssets.AssetName,
Version
‎02-14-2020 03:19 PM
KrisNelson wrote:
Just add it in twice; Here is code that 'should' work.Select Top 1000000 tblAssets.AssetID,
tblADusers.Lastname,
tblADusers.Firstname,
tblAssets.AssetUnique,
tblAssets.Domain,
tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
Case tblSoftware.softwareVersion
When '20.2.11.3' Then '2-Current-20.2.1'
When '20.0.0.377' Then '0-Original'
When '20.0.1.2' Then '0A-Original'
When '20.1.0.81' Then '1-20.1'
When '20.2.0.48' Then '2-20.2'
Else 'Unknown'
End As [Service Pack],
Case tblSoftware.softwareVersion
When '20.2.11.3' then '#d4f4be'
Else '#ffadad'
End As backgroundcolor,
tblSoftwareUni.SoftwarePublisher As Autodesk,
tsysOS.Image As icon,
tsysOS.OSname,
tblSoftware.softID As softid,
tblAssets.IPAddress,
tblAssets.IPNumeric
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblSoftwareUni.softwareName Like 'Autodesk Revit 2020' And
tblAssetCustom.State = 1 And tblSoftwareUni.SoftID = 2521
Order By [Service Pack],
tblAssets.AssetName,
Version
‎02-14-2020 03:07 PM
‎02-14-2020 03:10 PM
KrisNelson wrote:
There is 2 probable issues here; and they are probably both in play.
First, your Case code for the backgroundcolor isn't specifying a table.field to check. (If everything is showing up pink\light red, I could be wrong here)
Second, the value you are looking for won't exist in any table since you are merely replacing it for the display of the report. Meaning you need to check for '20.2.11.3' in order to see what you think is '2-Current-20.2.1'.
-Kris
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now