"Cool Facts" Report broken?

(imported topic written by SystemAdmin)

So as trivial as this report is, we happened to be showing it to a very high up individual and noticed that for two of the items we had the “Singular expression refers to nonexistent object.” error displaying. Those two items were OS - Average Windows OS year (WinNT 4.0=1996, WinME=2000, WinXP=2002) and OS - Average Computer Uptime.

If anyone gets a chance to look at this when they aren’t busy fixing important things, we’d be appreciative.

(imported comment written by BenKus)

Looks like it hasn’t been updated for Win7/Vista/2003… You can add to those two relevance expressions in the custom report definition:

… if it = “7” then 2009 else if it = “Vista” then 2007 else …

So it will look like this:

mean of (if it = “7” then 2009 else if it = “Vista” then 2007 else if it = “XP” then 2002 else if it = “NT” then 1996 else if it as lowercase = “me” then 2000 else if it = “95” then 1995 else if it = “98” then 1998 else it as integer) of (following texts of firsts “Win” of preceding texts of firsts " " of values whose (it as lowercase contains “win”) of results of bes property “OS”) as integer

I will try to get someone to update this on the website…

Ben

(imported comment written by cstoneba)

Still does not work for me. I tried it in webreports QNA and I get “Singular expression refers to nonexistent object.”

(imported comment written by SystemAdmin)

Same here. Still does not work. Thanks for trying!

(imported comment written by BenKus)

hmm… well… Try running this query (in your Web Reports QNA, Console Debugger, or the Excel Connector):

unique values of (following texts of firsts “Win” of preceding texts of firsts " " of values whose (it as lowercase contains “win”) of results of bes property “OS”)

It should tell you all the Windows variants that you have… Currently in this report, we have dealt with Windows 7, 2008, 2003, Vista, XP, NT, 2000, ME, 98, 95… If there are others listed from the query I sent, they are causing the problem and you can add them in the query “if” clause (or I can help)…

Ben

(imported comment written by SystemAdmin)

Ben, here is what we got from the WebQNA:

XP, Vista, 7 2003, 2008, 2008R2

So it looks like 2003, 2008 / 2008R2 are breaking it. Of course none of this takes into account our Mac clients :frowning:

So would you confirm the logic should look like this for windows clients (this seems to be working for us now):

mean of (if it = “7” then 2009 else if it = “2008” then 2008 else if it = “2008R2” then 2009 else if it = “2003” then 2003 else if it = “Vista” then 2007 else if it = “XP” then 2002 else if it = “NT” then 1996 else if it as lowercase = “me” then 2000 else if it = “95” then 1995 else if it = “98” then 1998 else it as integer) of (following texts of firsts “Win” of preceding texts of firsts " " of values whose (it as lowercase contains “win”) of results of bes property “OS”) as integer

Also note, you’ll want to change the text description to this:

Average Windows OS year (WinNT 4.0=1996, WinME=2000, WinXP=2002, Win2003=2003, WinVista=2007, Win2008=2008, Win7=2009, Win2008R2=2009):

We are still seeing the error for uptime. We found out something interesting that may point in the direction of the problem. The Windows retrieved property shows “Not Reported” for Mac clients in web reports and the Mac retrieved property shows “Not Reported” for Windows clients in web reports.

(imported comment written by cstoneba)

when I run run this in Web Reports QNA, I don’t get any results or errors

unique values of (following texts of firsts “Win” of preceding texts of firsts " " of values whose (it as lowercase contains “win”) of results of bes property “OS”)

One other thing. I see I have 2 BES Properties with the name of “OS”. One says that the site is “Reserved”. The other one says that it belongs to “Client Manager for Intel vPro”. Would this cause a problem?

(imported comment written by BenKus)

Ah… Yea… that will do it… Try this:

For OS property using the reserved property:

mean of (if it = “7” then 2009 else if it = “2008” then 2008 else if it = “2008R2” then 2009 else if it = “2003” then 2003 else if it = “Vista” then 2007 else if it = “XP” then 2002 else if it = “NT” then 1996 else if it as lowercase = “me” then 2000 else if it = “95” then 1995 else if it = “98” then 1998 else it as integer) of (following texts of firsts “Win” of preceding texts of firsts " " of operating systems whose (it as lowercase contains “win”) of bes computers) as integer

For uptime property with extra error checking:

if (exists results of bes property “Uptime”) then (mean of (preceding texts of firsts " days" of values whose (exists it as time interval) of results of bes property “Uptime” as integer)) as string & " days" else “Uptime property not activated”

Ben

(imported comment written by cstoneba)

Both work great. I had to tweak the property uptime name (from the bes inventory and license site, the property is Uptime - Windows).

Everylooks good now. thanks very much.

(imported comment written by SystemAdmin)

Looks like everything is working after making the changes. I did have to adjust the property name as cstoneba indicated. This limits the scope to just windows. Is there a way to pull these stats cross platform?