Your company's ad could live here and reach over 50,000 people a month!

Share This Post

Custom ChassisType Report – wrong counts

See the full details within the forum http://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/d8477233-4b10-4a6d-a5ea-de73abc9b815/

declare @Manufacturer0 as varchar(250)
set @Manufacturer0 = 'All'
declare @Version0 as varchar(250)
set @Version0 = 'All'
declare @CollectionID as varchar(250)
set @CollectionID = 'SMS00001'
 
 
SELECT 
  SE.ChassisTypes0,
  count (*) as ChassisCount 
FROM
  dbo.v_GS_SYSTEM_ENCLOSURE SE
  INNER JOIN dbo.v_GS_OPERATING_SYSTEM OS ON OS.ResourceID = SE.ResourceID
  INNER JOIN dbo.v_FullCollectionMembership FCM ON FCM.ResourceID = SE.ResourceID
WHERE
  (SE.Manufacturer0 = @Manufacturer0 or @Manufacturer0 = 'All')
  AND (OS.Version0 = @Version0 or @Version0 = 'All')
  AND (FCM.CollectionID = @CollectionID or @CollectionID = 'All')
GROUP BY 
  SE.ChassisTypes0
 


Share This Post

Leave a Reply