Location By Half Subnet and IP Range

(imported topic written by wolverine23)

Hi,

I have computer by half subnet and ip range , How can I generate a web report like this,

Location by Half Subnet OR IP Range

U.S. 9,000

Brazil 600

Puerto Rico 300

Mexico 4,000

Thanks in advance,

regards

wolverine.

(imported comment written by SystemAdmin)

Hey wolverine,

I think this will do the trick. It’s all done in relevance, with some css so its not as ugly.

<style> th 
{ font-size:15; background-color: #eaeaea; border: 1px solid #cccccc; margin: 0; padding: 6px 20px 1px 0; text-align: center; 
} td 
{ border: 0px; 
} #ResultsTable 
{ width: 100%; border-width: 0px; 
} #ResultsTable td 
{ vertical-align: top; 
} table 
{ font-size: 15px; color: black; 
} </style> <table id=
"ResultsTable"> <th>Location</th><th>Number of Computers</th> <?relevance concatenations of trs of (td of (it as string) & td of (multiplicity of it as string)) of unique values of values of results whose (not error flag of it) of bes properties whose (name of it as lowercase contains 
"location" OR name of it as lowercase contains 
"half subnet") ?> </table>

Let me know if it works.

(imported comment written by wolverine23)

Thanks Zak,

It works fine, only another favor, it shows location “n/a” and “N/A”, how can I eliminate them,

I tried to filter in web reports by location by half subnet but some sites not appear, if I try to filter for ip range also some sites not appear,

N/A 14063

Newmarket,Canada 368

Penang,Plant2 7

Raleigh,NC 470

Sherbrooke 191

Singapore Site 1

n/a

thanks in advance.

wolverine

(imported comment written by SystemAdmin)

Here you go, this should filter out all n/a results

<?relevance concatenations of trs of (td of (it as string) & td of (multiplicity of it as string)) of unique values of values of results whose (not error flag of it AND value of it as lowercase != "n/a") of bes properties whose (name of it as lowercase contains "location" OR name of it as lowercase contains "half subnet") ?>

All that was needed was 'value of it as lowercase != “n/a” ’

Just replace the original relevance expression with this one.

(imported comment written by wolverine23)

Excellent Zak,

It works fine, only another favor, it shows about 800 computers without location , how can I also eliminate them,

I tried to change this (value of it as lowercase != " ") 1 space, but those computers (800) remain,

Location Number of Computers

841

thanks in advance.

wolverine

(imported comment written by SystemAdmin)

Hmm, your change should have worked. Make sure that the value it actually 1 blank space (" “), and not something like a empty string (”") or two blank spaces.

This expression may help, its the same as before only the location has ’ ’ added around it.

concatenations of trs of (td of ("’" & it as string &"’") & td of (multiplicity of it as string)) of unique values of values of results whose ( value of it != " " AND not error flag of it AND value of it as lowercase != “n/a”) of bes properties whose (name of it as lowercase contains “location” OR name of it as lowercase contains “half subnet”)

(imported comment written by jessewk)

I think you need to add either a check for a blank or a check for non-existance. This will do both:

concatenations of trs of (td of ("’" & it as string &"’") & td of (multiplicity of it as string)) of unique values of values of results whose ( exists value of it AND value of it != “” AND not error flag of it AND value of it as lowercase != “n/a”) of bes properties whose (name of it as lowercase contains “location” OR name of it as lowercase contains “half subnet”)

(imported comment written by wolverine23)

Thanks Zak and Jessewk,

This is working fine, I appreciate your time,

Regards.

wolverine.