Share via


Advanced Exercise 1 Solution: Create a New Report for Compliance Settings in Configuration Manager

 

Updated: January 1, 2014

Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager

Use the following procedure to create the report in Advanced Exercise 1: Create a New Report for Compliance Settings in Configuration Manager.

Note

Depending on your experience at creating SQL reports, there are numerous paths you can use to create a report. You can use your preferred method of creating reports if you prefer.

To create the Status of configuration baselines deployed to a specified computer report

  1. In the Configuration Manager console, click Monitoring.

  2. In the Monitoring workspace, expand Reporting, and then click Reports.

  3. In the Home tab, in the Create group, click Create Report.

  4. On the Information page of the Create Report Wizard, select SQL-based Report, and then supply the following information:

    - **Name:** Enter **Status of configuration baselines deployed to a specified computer**.
    
    - **Description:** Enter **Displays the name and description of the configuration baselines that are deployed to a specific computer and whether the computer returns compliant or noncompliant for the configuration baseline**.
    
    - **Server:** This field is automatically entered. Ensure that it matches the name of your Reporting Server.
    
    - **Path:** Click **Browse** to select the folder in which the new report will be stored. For this exercise, select **Compliance and Settings Management**.
    
  5. To continue, click Next.

  6. On the Summary page of the Create Report Wizard, review the information and then click Next.

  7. On the Completion page of the Create Report Wizard, review the actions that were taken, and then click Close. Report Builder now opens to allow you to construct the report.

  8. Next, you must create the datasets that this report will use to return results for the report. This report uses two datasets. The first of these is used to list computer names that can be selected to use as a basis for the report. The second contains the SQL statements for the report itself.

    In the Report Data pane, right-click Datasets and then click Add Dataset.

  9. On the Query page of the Dataset Properties dialog box, supply a name for the dataset, or use the default name, and then select Use a dataset embedded in my report.

  10. In the Data source drop-down list, select the data source you want to use for the report. This is typically automatically generated and will begin with AutoGen_.

  11. Select a query type of Text, and then enter the following query in the Query field.

     SELECT DISTINCT SYS.Netbios_Name0 
       from v_R_System SYS WHERE SYS.Client0=1 
       ORDER By SYS.Netbios_Name0
    
  12. Click OK to close the Dataset Properties dialog box. The new dataset, named by default DataSet1 is now displayed in the Datasets node of the Report Data pane.

    You have now created the query that the report parameter will use to return the available client names from which you can choose to run the report.

  13. Next create the parameter that the report will use to let you select the computer that will be reported on.

    In the Report Data pane, right-click Parameters, and then click Add Parameter.

  14. On the General page of the Report Parameter Properties dialog box, change the value in the Prompt field to read Computer name.

  15. On the Available Values page of the Report Parameter Properties dialog box, select Get values from a query.

  16. Select the following values:

    • Dataset: Choose DataSet1

    • Value field: Choose Netbios_Name0

    • Label field: Choose Netbios_Name0

  17. Click OK to close the Report Parameter Properties dialog box. The new parameter ReportParameter1 is displayed in the Parameters node of the Report Data pane.

  18. At this point, run the report to check the parameter is working correctly. On the Home tab, in the Views group, click Run.

  19. Verify that the Computer name field is shown. When you click this field, you should see all Windows client computers in the drop-down list.

  20. On the Home tab, in the Views group, click Design to return to the design view.

  21. Now, you must create the main dataset for the report.

    In the Report Data pane, right-click Datasets and then click Add Dataset.

  22. On the Query page of the Dataset Properties dialog box, supply a name for the dataset, or use the default name, and then select Use a dataset embedded in my report.

  23. In the Data source drop-down list, select the data source you want to use for the report. This is typically automatically generated and will begin with AutoGen_.

  24. Select a query type of Text, and then enter the following query in the Query field.

     SELECT v_CICurrentComplianceStatus.ComplianceState, 
       v_LocalizedCIProperties.DisplayName, v_LocalizedCIProperties.Description, 
     v_R_System.Netbios_Name0 
     FROM v_CICurrentComplianceStatus INNER JOIN v_R_System ON 
       v_CICurrentComplianceStatus.ResourceID = v_R_System.ResourceID 
     INNER JOIN v_ConfigurationItems ON 
       v_CICurrentComplianceStatus.CI_ID = v_ConfigurationItems.CI_ID 
     INNER JOIN v_LocalizedCIProperties ON 
       v_CICurrentComplianceStatus.CI_ID = v_LocalizedCIProperties.CI_ID 
     WHERE (v_ConfigurationItems.CIType_ID = 2) 
    
  25. Click OK to close the Dataset Properties dialog box.

  26. On the Insert tab, in the Data Regions group, click Table, and then click Table Wizard.

  27. On the New Table or Matrix page of the wizard, select Choose an existing dataset in this report or a shared dataset, select DataSet2 and then click Next.

  28. On the Arrange fields page of the wizard, drag ComplianceState, DisplayName, Description and Netbios_Name0 from the Available fields pane, to the Values pane.

  29. Click Next to see a preview of your report, and then click Next again.

  30. On the Choose a style page of the wizard, choose one of the available themes for the report, and then click Finish.

  31. On the Home tab, in the Views group, click Run.

  32. In the Computer name field, select a computer from the drop-down list, and then click View Report.

  33. Verify that the data in the report is as expected.

  34. Save and close the report in Report Builder.

  35. The new report is now available in the Configuration Manager console.

Next Steps

Report builder includes many options to change elements of reports, including themes, column headings and more. Consult your Report Builder help for more information.