The following guide will demonstrate how to create a new report using Microsoft System Center Configuration Manager R2.
In this example we will be creating a report which will list operating systems and service packs by collections. When the report is ran it will prompt for a collection to be selected.
The report will also be linked to ‘Computer information for a specific computer’ report, allowing you to see detailed information on the systems listed.
How to create a report using SCCM R2:
- With the Configuration Manager Console open,
- Example the ‘Computer Management’ node, then ‘Reporting’ and ‘Reports’
- Right click on ‘Reports’ (or your custom reporting folder)
- Select ‘New’ then ‘Report’
- Under ‘Name’ enter in the desired name, e.g. List operating systems and service packs – by collection
- Select a category, e.g. Software Updates – A. Compliance
- Click on the ‘Edit SQL Statement’ button
- Under ‘SQL statement’ enter the following code:
-
SELECT
rsys.Name0 AS 'Computer Name', Caption0 as 'Operating System',CSDVersion0 as 'Service Pack'
FROM
v_R_System rsys
JOIN v_GS_OPERATING_SYSTEM os ON rsys.ResourceID = os.ResourceID
JOIN v_FullCollectionMembership fcm on os.ResourceID = fcm.ResourceID
WHERE
fcm.CollectionID = @CollectionID
ORDER BY
rsys.Name0 - Click on the ‘Prompts’ button
- Click on the ‘New’ button (Yellow star icon)
- Under ‘Name’ enter CollectionID
- Under ‘Prompt text’ enter Collection
- Place a tick next to ‘Provide a SQL statement’
- Click on the ‘Edit SQL Statement’ button
- Under ‘SQL statement’ enter the following code:
-
begin
if (@__filterwildcard = '')
select CollectionID, Name from v_Collection order by Name
else
select CollectionID, Name from v_Collection
WHERE CollectionID like @__filterwildcard
order by Name
end - Click ‘OK’ to save the changes
- Click ‘OK’ several times to save the changes and return to the ‘New Report Wizard’
- Click ‘Next’ then ‘Next’ again
- Under ‘Link type’ select ‘Link to another report’
- Under ‘Report’ click on the ‘Select’ button
- From the reports list, select ‘Computer information for a specific computer’
- Click ‘OK’ to close the window
- Click ‘Next’, ‘Next’ then ‘Close’
The run the report:
- Navigate to where the report was saved/created
- Right click on the report and select ‘Run’
- The report will load. You will need to use the ‘Values’ button to select the collection
- Click ‘Display’ to display the report
- The report will list all the systems in the collection, displaying their operating system version and service pack level.
- To get detailed information on each system click on the arrow to the left of the system name.