After setting up custom inventory script task and a custom data class to collect and store custom inventory data, the easiest way to view the data is to create a custom SQL report. For the previous steps please see KB 181379 for setting up a custom data class and KB 178942 for setting up a custom inventory script task.
- Create a SQL query for the custom report:
- Identify the SQL database table created for the custom dataclass, its name will be Inv_Data_Class.
- Identify the columns (attributes) of the data class table that will be viewed in the report.
- To view the names of the inventoried computers followed by their custom inventory data construct a SQL query as follows and supply the appropriate data class table and attributes:
select vItem.Name [Computer], Inv_Data_Class.Attribute1, Inv_ Data_Class.Attribute2 from Inv_ Data_Class
left join vItem on Inv_ Data_Class._ResourceGuid = vItem.Guid
- Create the custom report:
- Go to Reports>All Reports.
- Browse to a folder where you would like to add the custom report and Right Click on the folder.
- Select New>Report>SQL Report.
- Give the report an appropriate name.
- Replace the text under Parameterized Query with the SQL query created in step 1.
- Click Save Changes.