cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PoWen_Cheng
Engaged Sweeper II

Hi everyone, My LANSWEEPER has two Active Directory Domains. I want to add a new tab to the Dashboard. How can I display the asset information of only one of the Active Directory Domains in this new tab or widgets? Can it be customized? Thanks

Standard and Custom Fields Active Directory view New Tabs/Companies 

LLL.png

1 ACCEPTED SOLUTION

Try hint

Where tsysIPLocations.IPLocation In (N'台中后科廠11', N'台中后科廠22')

View solution in original post

8 REPLIES 8
Mercedes_O
Community Manager
Community Manager

Thanks for the feedback @PoWen_Cheng also 'accept as solution' if that answers the original query

Mister_Nobody
Honored Sweeper II

Firstly, tsysIPLocations.IPLocation is name of IP-location which you defined in the section "IP Address Range locations" on page /configuration/AssetGroups/. 

So I can recommend give name by DCHP Scopes or campus/building/floor

You can add WHERE  at the end of query for tsysIPLocations.IPLocation

If you want compare IP then you must add own decoder to convert different type of IP format in LS

example of decoder:

 

 tsysIPLocations.startip <= Right('000' +
      IsNull(ParseName(tsysIPScanRanges.Ipend, 4), ''), 3) + Right('000' +
      IsNull(ParseName(tsysIPScanRanges.Ipend, 3), ''), 3) + Right('000' +
      IsNull(ParseName(tsysIPScanRanges.Ipend, 2), ''), 3) + Right('000' +
      IsNull(ParseName(tsysIPScanRanges.Ipend, 1), ''), 3) And
      Right('000' + IsNull(ParseName(tsysIPScanRanges.Ipstart, 4), ''), 3) +
      Right('000' + IsNull(ParseName(tsysIPScanRanges.Ipstart, 3), ''), 3) +
      Right('000' + IsNull(ParseName(tsysIPScanRanges.Ipstart, 2), ''), 3) +
      Right('000' + IsNull(ParseName(tsysIPScanRanges.Ipstart, 1), ''), 3) <=
      tsysIPLocations.endip

 

 

 

HI Mister_Nobody,

I'm a newbie so I'm not familiar with it. I modified it myself and added a line, but the query showed no results. Did I add the wrong place or parameters? Thanks

Select Top 1000000 tsysIPLocations.IPLocation,
tsysIPLocations.Realstart,
tsysIPLocations.Realend,
(Select Distinct COUNT(*)
From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID =
tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP)
As TotalAssets
From tsysIPLocations
Where tsysIPLocations.IPLocation In ('台中后科廠11', '台中后科廠22')
Order By TotalAssets

PoWen_Cheng_1-1695196362215.png

 

Try hint

Where tsysIPLocations.IPLocation In (N'台中后科廠11', N'台中后科廠22')

HI Mister_Nobody,

Thank you. This line of CODE is valid and can be queried. I would like to ask how to modify this REPORT so that the result of the query is only the computer assets of CFP Active Directory Domains? Thanks

try this

Select Top 1000000 tsysIPLocations.IPLocation,
  tsysIPLocations.Realstart,
  tsysIPLocations.Realend,
  (Select Distinct COUNT(*)
    From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID =
          tblAssetCustom.AssetID
    Where tblAssetCustom.State = 1 And tblAssets.domain = 'your_domain' And
      tblAssets.IPNumeric >= tsysIPLocations.StartIP And tblAssets.IPNumeric <=
      tsysIPLocations.EndIP) As TotalAssets
From tsysIPLocations
Where tsysIPLocations.IPLocation In ('IPL1', 'IPL2')
Order By TotalAssets
Mister_Nobody
Honored Sweeper II

1. No solution for domain list.

2. You can create report for locations and add it as Data report.

For example,

 

 

Select Top 1000000 tsysIPLocations.IPLocation,
  tsysIPLocations.Realstart,
  tsysIPLocations.Realend,
  (Select Distinct COUNT(*)
    From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID =
          tblAssetCustom.AssetID
    Where tblAssetCustom.State = 1 And tblAssets.IPNumeric >=
      tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP)
  As TotalAssets
From tsysIPLocations
Order By TotalAssets

 

 

and filter by

where tsysIPLocations.IPLocation in ('IPL1','IPL2',...)

 

HI Mister_Nobody,

Thank you for your REPORT, but I don’t know where to modify the filtering IP conditions. I want the specific section, for example, I want to query 10.1.1.1-10.1.1.250, 10.1.2.1-10.1.2.250, 10.1.3.1-10.1. 3.250, 10.1.4.1-10.1.4.250, 10.1.5.1-10.1.5.250

How to modify the asset report? Thanks