Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Inventory Report Add/Remove Programs - Help adding "manufacturer" (NS6)

Updated: 02 Oct 2010 | 5 comments
jebba's picture
+1 1 Vote
Login to vote

I'm ok when it comes to "recontructing" some of the straight forward out of the box inventory reports, but when it comes to the "count of" and "group by" ones, I get a little lost. I'm trying to see ig I can the report "Count of Distinct Add/Remove Program Applications" to include Manufacturer or Publisher.
Any help would be grewatly appreciated.
Thanks

Comments

KSchroeder's picture
30
Mar
2010
1 Vote +1
Login to vote

SQL

jebba,
No doubt, it can be a bit daunting when you start GROUPing BY and COUNTing (count still gets me sometimes!)  The trick with using "aggregate" functions (like COUNT, MAX, MIN, etc) is that you then have to GROUP BY all the other columsn which aren't the column being counted.  The following should work (note I don't have access to my NS at the moment, so the column names may be a bit off).  Also this is designed to have a "Collection Picker" parameter included; if you don't want the collection picker option, just comment out the JOIN and the rest that references cm.*:
 

SELECT arp.Name, arp.Publisher, arp.Version, count(*) AS [Total]
FROM Inv_AeX_OS_Add_Remove_Programs arp
JOIN CollectionMembership cm
ON arp._ResourceGuid = cm.ResourceGuid
AND cm.CollectionGuid = '%_Collection%'
GROUP BY arp.Name, arp.Publisher, arp.Version
ORDER BY COUNT(*) DESC  -- you can also use numbers here, 1 corresponds to the first column, 2 to the second, etc.


Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.

jebba's picture
01
Apr
2010
0 Votes 0
Login to vote

Thanks for the reply but:

Conversion failed when converting from a character string to uniqueidentifier

dfrancis's picture
01
Apr
2010
0 Votes 0
Login to vote

Probably missing the parameter

Jebba,

You'll see that if you don't have a _Collection parameter defined referring to the Collection picker.

Drop lines 3, 4 and 5 from Kyle's query if you don't want to filter by collection (e.g. target "All Computers" always) and it should work for you without having to add the parameter.

--Dave

If a forum post solves your problem, please flag it as a solution. If you like an article, blog post or download vote it up.

KSchroeder's picture
02
Apr
2010
0 Votes 0
Login to vote

Yup, thanks dfrancis

In my environment I almost always have to filter reports by collections, so I always put in the Collection Picker bit to help filter down the results.  The only downside is that if you want to set a default Collection, you have to export the report to XML, edit in the collection GUID you want as the default, then re-import it to the console.  Not exactly user-friendly.

Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.

KSchroeder's picture
02
Apr
2010
0 Votes 0
Login to vote

Report

I will try to post up (as a download) my customized Add/Remove Programs report which is based on the above.  It has drilldowns to detailed view as well.

Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.