// ********************************************************************************* // // Created by SMS Export object wizard // // Tuesday, September 18, 2007 created // // File Name: Count of Chassis Types by Collection.MOF // // Comments : // // // ********************************************************************************* // ***** Class : SMS_Report ***** [SecurityVerbs(140551)] instance of SMS_Report { Category = "Custom Reports"; Comment = "Displays computers by selected Chassis Type in a Collection"; GraphXCol = 1; GraphYCol = 2; MachineDetail = FALSE; MachineSource = FALSE; Name = "Computers with specific Chassis Type"; NumPrompts = 2; RefreshInterval = 0; ReportParams = { instance of SMS_ReportParameter { AllowEmpty = FALSE; DefaultValue = ""; PromptText = "Enter Enclosure Type"; SampleValueSQL = "begin \n if (@__filterwildcard = '') \n select distinct ChassisTypes0 from dbo.v_GS_SYSTEM_ENCLOSURE \n else \n select distinct ChassisTypes0 from dbo.v_GS_SYSTEM_ENCLOSURE \n where ChassisTypes0 like @__filterwildcard \nend"; VariableName = "ENC"; }, instance of SMS_ReportParameter { AllowEmpty = FALSE; DefaultValue = ""; PromptText = "Enter Collection ID"; SampleValueSQL = "begin \n if (@__filterwildcard = '') \n SELECT DISTINCT CollectionID, Name FROM v_Collection ORDER BY Name \n else \n SELECT DISTINCT CollectionID, Name FROM v_Collection \n WHERE CollectionID like @__filterwildcard \n ORDER BY Name \nend"; VariableName = "ID"; }}; SecurityKey = ""; SQLQuery = "SELECT TOP 100 PERCENT ENC.ChassisTypes0, SYS.Netbios_Name0, dbo.v_FullCollectionMembership.CollectionID \nFROM dbo.v_GS_SYSTEM_ENCLOSURE ENC INNER JOIN \n dbo.v_R_System SYS ON ENC.ResourceID = SYS.ResourceID INNER JOIN \n dbo.v_FullCollectionMembership ON SYS.ResourceID = dbo.v_FullCollectionMembership.ResourceID \nWHERE (ENC.ChassisTypes0 = @ENC) AND (dbo.v_FullCollectionMembership.CollectionID =@ID) \nORDER BY SYS.Netbios_Name0"; StatusMessageDetailSource = FALSE; }; // ***** End ***** // ***** Class : SMS_Report ***** [SecurityVerbs(140551)] instance of SMS_Report { Category = "Custom Reports"; Comment = "Displays a count of Chassis Types and Names by Collection"; DrillThroughColumns = {}; GraphCaption = ""; GraphXCol = 1; GraphYCol = 2; MachineDetail = FALSE; MachineSource = FALSE; Name = "Count of Chassis Type by Collection"; NumPrompts = 1; RefreshInterval = 0; ReportParams = { instance of SMS_ReportParameter { AllowEmpty = FALSE; DefaultValue = ""; PromptText = "Enter Collection ID"; SampleValueSQL = "begin \n if (@__filterwildcard = '') \n SELECT DISTINCT CollectionID, Name FROM v_Collection ORDER BY Name \n else \n SELECT DISTINCT CollectionID, Name FROM v_Collection \n WHERE CollectionID like @__filterwildcard \n ORDER BY Name \nend"; VariableName = "ID"; }}; SecurityKey = ""; SQLQuery = "SELECT TOP 100 PERCENT 'Chassis Type' = enc.ChassisTypes0, \n 'Chassis Name' = CASE enc.ChassisTypes0 \n WHEN '1' THEN 'Other' WHEN '2' THEN 'Unkown' \n WHEN '3' THEN 'Desktop' WHEN '4' THEN 'LowProfileDesktop' \n WHEN '5' THEN 'Pizza Box' WHEN '6' THEN 'Mini-Tower' \n WHEN '7' THEN 'Tower' WHEN '8' THEN 'Portable' \n WHEN '9' THEN 'Laptop' WHEN '10' THEN 'Notebook' \n WHEN '11' THEN 'Hand - Held' WHEN '12' THEN 'Docking Station' \n WHEN '13' THEN 'ALL- IN -One' WHEN '14' THEN 'Sub Notebook' \n WHEN '15' THEN 'Space Saving Chassis' WHEN '16' THEN 'Lunch Box' \n WHEN '17' THEN 'Main System Chassis' WHEN '18' THEN 'Expansion Chassis' \n WHEN '19' THEN 'Sub Chassis' WHEN '20' THEN 'Bus Expansion Chassis' \n WHEN '21' THEN 'Peripheral Chassis' WHEN '22' THEN 'Storage Chassis' \n WHEN '23' THEN 'Rack Mounted Chassis' WHEN '24' THEN 'Sealed CASE PC' \n WHEN '25' THEN 'Tablet -PC' \n ELSE enc.ChassisTypes0 END, \n COUNT(*) AS 'Count', dbo.v_FullCollectionMembership.CollectionID \nFROM dbo.v_GS_SYSTEM_ENCLOSURE ENC INNER JOIN \n dbo.v_R_System SYS ON ENC.ResourceID = SYS.ResourceID INNER JOIN \n dbo.v_FullCollectionMembership ON SYS.ResourceID = dbo.v_FullCollectionMembership.ResourceID \nWHERE (dbo.v_FullCollectionMembership.CollectionID =@ID) \nGROUP BY ENC.ChassisTypes0, dbo.v_FullCollectionMembership.CollectionID \nORDER BY COUNT DESC"; StatusMessageDetailSource = FALSE; XColLabel = ""; YColLabel = ""; }; // ***** End *****