Is there a way I can create a custom report including the “Location by Half Subnet” property and No. of relevant fixlets from a pre-defined group of patches per PC.
Lets say I want to know the number of relevant patches per PC from the following pool: MS05-22 to MS06-45 and display the results as shown below:
Computer Name - - Location by Half Subnet - - No. of Relevant Patches from custom Group -
You can create a custom report with the following definition:
Computer Name
Location By Half Subnet
Relevant Patches from Custom Group
<?relevance
trs of
(
td of link of it & td of
(
(
if
(
exists result
(
it, bes property "Location By Half Subnet"
)
)
then
(
value of result
(
it, bes property "Location By Half Subnet"
)
)
else
"N/A"
)
of it
)
& td of
(
(
number of relevant
(
bes fixlets
whose
(
name of it starts with "MS06-06"
)
)
whose
(
it
)
of it
)
as string
)
)
of bes computers
?>
Note that this looks for the group of fixlets that start with “MS06-06”. You will want to adjust this appropriately for your purposes. For example, you might do: (name of it starts with “MS06-061” OR name of it starts with “MS06-059”)
Note also that this might be really slow. Let me know if it’s too slow and we can try to adjust it.
You’re property for half subnet might be named differently. Please check that the capitalization and formating is the same in the code above as the property in the console.
<?relevance
trs of
(
td of link of it & td of
(
(
if
(
exists result
(
it, bes property "Full OS Name"
)
)
then
(
value of result
(
it, bes property "Full OS Name"
)
)
else
"N/A"
)
of it
)
& td of
(
(
number of relevant
(
bes fixlets
whose
(
name of it starts with "MS06-066"
)
)
whose
(
it
)
of it
)
as string
)
)
of bes computers
?>
<table> <tbody> <th>Computer Name</th><th>Location By Half Subnet</th><th>Relevant Patches from Custom Group</th> <?relevance trs of (td of link of it & td of ((
if (exists result (it, bes property
"Location By Half Subnet" ) whose (not error flag of it)) then (value of result (it, bes property
"Location By Half Subnet" ))
else
"N/A" ) of it) & td of ((number of relevant fixlets whose (fixlet flag of it =
true AND globally visible flag of it =
true) of it as string))) of bes computers ?> </tbody> </table>
With this report, rather than specifying which Fixlets to use in the relevance, use the “Filter” mechanism in Web Reports to select which Fixlets you want to include in the report.