Notification

Icon
Error

Filtering Report Based On Active Status

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

CyberCitizen

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

Like '%Active%'

Active Discussions

Lansweeper Help Desk Workflow
by  lswanson   Go to last post Go to first unread
Last post: Yesterday at 11:12:21 PM(UTC)
Lansweeper Changing to remote scanning due to COVID
by  FrankSc  
Go to last post Go to first unread
Last post: Yesterday at 9:35:26 PM(UTC)
Lansweeper Not giving hackers the Domain Admin password / account
by  FrankSc   Go to last post Go to first unread
Last post: Yesterday at 9:27:13 PM(UTC)
Lansweeper LsAgent failing - Lansweeper SSL Expired
by  lansweeper25t34  
Go to last post Go to first unread
Last post: Yesterday at 8:33:28 PM(UTC)
Lansweeper Is there a chance to get the firewall off via Lansweeper?
by  EDV_OHZ   Go to last post Go to first unread
Last post: Yesterday at 4:57:26 PM(UTC)
Lansweeper Merge Asset button
by  KeithBecker  
Go to last post Go to first unread
Last post: 8/5/2020 9:27:54 PM(UTC)
Lansweeper Merge Two Assets or Update Based on Serial Number
by  KeithBecker   Go to last post Go to first unread
Last post: 8/5/2020 9:25:16 PM(UTC)
Lansweeper Hyper-V guest assets
by  bgstein  
Go to last post Go to first unread
Last post: 8/5/2020 5:50:24 PM(UTC)