Notification

Icon
Error

Filtering Report Based On Active Status

Posted: Thursday, May 21, 2020 3:47:13 AM(UTC)
CyberCitizen

CyberCitizen

Member Original PosterPosts: 429
0
Like
Hi Guy's,

Having an issue limiting the search results on a report. Never had much luck limiting results under the OU section.

UserPostedImage

Basically trying to limit the results to Active. We have Disabled and Test, I am wanting to show Active on this report only.

If anyone can assist, that would be fantastic.

Report listed below.

Code:
Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Username,
  tblAssets.Version,
  tblAssets.Domain,
  tblAssetCustom.Location,
  tsysIPLocations.IPLocation,
  tblAssets.IPAddress,
  tsysAssetTypes.AssetTypename As Type,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tblAssets.Lastseen,
  tsysAssetTypes.AssetTypeIcon10 As icon,
  Case
    When tblAssets.Version > '1703%' Then '#d4f4be'
    Else '#ffadad'
  End As backgroundcolor,
  tblADComputers.OU As [Active OU]
From tblAssets
  Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
    tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
  Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Left Outer Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblAssets.IPAddress Is Not Null And tblAssets.IPAddress != '' And
  tsysAssetTypes.AssetTypename = 'Windows' And tblAssetCustom.State = 1
Order By tblAssets.Version,
  tblAssets.IPNumeric
CyberCitizen
#1CyberCitizen Member Original PosterPosts: 429  
posted: 5/21/2020 4:04:33 AM(UTC)
Sorted, sorry just a brain fart moment.

Like '%Active%'

Active Discussions

Lansweeper try to scan for software license and not working?
by  rader   Go to last post Go to first unread
Last post: Today at 4:25:37 PM(UTC)
Lansweeper LsAgent uninstalled itself (Windows 10 Enterprise)
by  LsUsers70  
Go to last post Go to first unread
Last post: Today at 3:05:37 PM(UTC)
Lansweeper Deploying PowerShell script
by  FreddieIT   Go to last post Go to first unread
Last post: Today at 10:57:34 AM(UTC)
Lansweeper Deploy package - add registry key to HKCU
by  Bginchereau  
Go to last post Go to first unread
Last post: Yesterday at 5:26:16 PM(UTC)
Lansweeper Duplicate Items
by  Tim Van Engeland   Go to last post Go to first unread
Last post: Yesterday at 2:46:32 PM(UTC)
Lansweeper Latest LsAgent version for Windows?
by  mg83  
Go to last post Go to first unread
Last post: Yesterday at 11:07:51 AM(UTC)
Lansweeper Exchange scanning
by  brama   Go to last post Go to first unread
Last post: Yesterday at 8:56:01 AM(UTC)