Notification

Icon
Error

Filtering Report Based On Active Status

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

CyberCitizen

Member Original PosterPosts: 363
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: 363  
posted: 5/21/2020 4:04:33 AM(UTC)
Sorted, sorry just a brain fart moment.

Like '%Active%'

Active Discussions

Lansweeper Lost Configuration tab (Admin rights)
by  kspap   Go to last post Go to first unread
Last post: Today at 10:30:12 AM(UTC)
Lansweeper Deployment with different user rights
by  Jupiter_IT  
Go to last post Go to first unread
Last post: Today at 9:39:20 AM(UTC)
Lansweeper cisco fuji device not linking with connected devices
by  char   Go to last post Go to first unread
Last post: Yesterday at 9:12:07 AM(UTC)
Lansweeper Microsoft CVE-2020-1425
by  Richard_B  
Go to last post Go to first unread
Last post: 7/3/2020 4:29:41 PM(UTC)
Lansweeper Wake on Lan in VLANs
by  FrankSc   Go to last post Go to first unread
Last post: 7/3/2020 1:56:46 PM(UTC)
Lansweeper Ticket Closed = email to all helpdesk desk agents
by  Laurent Maene  
Go to last post Go to first unread
Last post: 7/3/2020 1:23:49 PM(UTC)
Lansweeper Helpdek Call Re-Opened
by  pryan67   Go to last post Go to first unread
Last post: 7/3/2020 1:12:17 PM(UTC)
Lansweeper Office 365 32bit vs 64bit?
by  brodiemac-too  
Go to last post Go to first unread
Last post: 7/2/2020 10:35:19 PM(UTC)