Step-by-Step SCCM Report Creation using Report Builder

Benoit LecoursREPORT, SCCM, SSRS0 Comments

One of our favorite tasks when it comes to ConfigMgr management is SCCM Report Creation. Not only it brings value to an SCCM installation, it bring visibility on your hard work toward your management. Without SCCM reports, this huge management tools is running silently on all your devices but you’re not benefiting of all the advantages. It’s like having a sport car and discovering the Autobahn … ok maybe not.

But what makes a good SCCM report ?

  1. Data, data, data
    • This is the more important part of your reports. You need to query the right SQL views in the SCCM database. If you’re showing incorrect information, your report will be useless
    • Building an efficient SQL query is the hard part of report creation. Without any SQL skills, it will be hard to achieve what you want… but, everything can be learned. Two years ago I’ve never done a SCCM report and today we’ve build many and sells them to businesses like yours.
  2. Visually attractive
    • A report full of data is useful but if it’s presented awfully, you won’t get readers attention
    • Try to keep it clean : add pie charts and graph if possible. Microsoft proves this with their latest Software Update dashboard and Office 365 dashboard.
  3. The little details :
    • Try to add links between your report to direct your reader in the right direction
    • Add tool tips to explain the data shown

In our opinion, the default SCCM Reports are lacking many of those points. Yes, they offer valuable data but they are often not adapted to your environment and are visually… basic.

For all those reasons, we started to create our own set of reports and due to their growing popularity, we decided to help you begin your own SCCM report creation process. For this example, we will show the process that we took when designing our free Office 365 report.

Building the SQL Query

SCCM 1606 introduce a new way to inventory Office 365. A new inventory class is created on the client and this data is stored in the v_GS_OFFICE365PROPLUSCONFIGURATIONS. We found this view by browsing the v_GS_* classes in the SCCM database. These classes are usually related to hardware inventory information.

SCCM Report Creation

By using a simple query we can see all data stored in this view:

Select * v_GS_OFFICE365PROPLUSCONFIGURATIONS

SCCM Report Creation

By looking at the results, we know that this is the right view to use.

The machine name is not included in this view. We need to use a JOIN SQL command to get it from the V_R_System view which is the “main” discovery view containing your clients. An SQL JOIN clause is used to combine rows from two tables, based on a common field between them. In our case (We join V_R_System and v_GS_OFFICE365PROPLUSCONFIGURATIONS based on the same ResourceID)

SELECT * FROM v_GS_OFFICE365PROPLUSCONFIGURATIONS OFI
JOIN v_R_System SYS ON SYS.ResourceID = OFI.ResourceID

After that, we’re adding SYS.Name0 in the SELECT to add the machine name from the V_R_System view and we use a WHERE clause to exclude all NULL records.

SELECT SYS.Name0,* FROM v_GS_OFFICE365PROPLUSCONFIGURATIONS OFI
JOIN v_R_System SYS ON SYS.ResourceID = OFI.ResourceID
WHERE CDNBaseUrl0 is not null

We end up with something like this :

SCCM Report Creation

You can modify the query to exclude unwanted data. Once your query is created, we can create the report.

SCCM Report Creation

To create SCCM custom report, follow theses steps :

  • Open the SCCM console and go to Monitoring / Overview / Reporting
  • Right click on Reports and select Create Reports

SCCM Report Creation

  • On the Create Report Wizard, select type SQL-based Report
  • Enter the name of the report Office 365 Inventory
  • Enter a report Description if desired
  • Click on Browse and select the folder where the report will be saved
  • Click Next

SCCM Report Creation

  • Review the Summary and complete the wizard

SCCM Report Creation SCCM Report Creation

  • Report Builder will automatically run

sccm 2012 custom reports

  • Click Run

Report Builder

Report Builder is a simple tool to create reports. You can also use Visual Studio but you need a licence, so we’ll stick to Report Builder. We will explain the basic steps for creating a report.

Once Report Builder is launch, look at the left part of the screen, we will focus on the Report Data section.

Data Sources and Datasets folder are the most important to startThe Data Source section will be used to configure the database and Dataset will be used for the SQL query.

sccm 2012 custom reports

In our case, we won’t use Built-in Fields and Parameters but they are very useful when you want to standardize your reports. For example, if you want to scope a report to a specific collection, you will need to use the Parameters section. If you want to include your company logo in the report, you will need to import it in the Images folder.

Configure the Data Sources

We first need to connect to the SCCM database :

  • Right click on Data Sources in Report Data on left panel and select Add Data Source
  • In the General tab, enter a name for your data source
  • Select Use a shared connection or report model
  • Click on Browse

SCCM Report Creation

  • Browse to the end and select your SCCM Database GUID and click Open

SCCM Report Creation

  • Back in Data Source Properties, click Test Connection to test your configuration and OK when you’re done

SCCM Report Creation

Note
Make sure that your account has access to the database. If not, set up another account via Credentials on the left panel.

Create a Dataset

The Datasets section is where your SQL query will be created.

  • Right click Datasets in the left panel and select Add Dataset

sccm 2012 custom reports

  • Select Use a dataset embedded in my report and select the data source you just created
  • In the Query field, paste this SQL query
SELECT SYS.Name0,* FROM v_GS_OFFICE365PROPLUSCONFIGURATIONS OFI
JOIN v_R_System SYS ON SYS.ResourceID = OFI.ResourceID
WHERE CDNBaseUrl0 is not null

SCCM Report Creation

  • Click Ok
  • You can see on the right side all fields returned by your query

SCCM Report Creation

Report Design

We are now ready to create the visual side of the report. We will include the data returned by the query.

  • Double-click the title and rename it to Office 365 Inventory
  • On the top menu select Insert / Table / Table Wizard

SCCM Report Creation

  • Select the Dataset that you just created, click Next

SCCM Report Creation

  • Select desired fields to be displayed in the table and drag them to the Values box. In our example we simple just take everything.

SCCM Report Creation

  • In the Layout section, just hit Next

SCCM Report Creation

  • In the Style screen, choose Generic because we’ll modify the font and color ourselves, click Finish

SCCM Report Creation

  • You will end up having a basic report with a title and the table you just created

SCCM Report Creation

Visual Modification

  • We will now change the default font
  • Select the whole row and select the desired font and color on the top

SCCM Report Creation

  • We will now import our company logo in the report
  • Right-click Image and select Add Image

SCCM Report Creation

Once imported, drag the Image to your report, click OK on the Image Properties box

SCCM Report Creation

  • Size it and place it where you need it
  • It already look much better :

SCCM Report Creation

  • Other thing we suggest to change :
    • Column name and column size
    • Include tool tip if any field are non descriptive
    • Remove any unwanted column (Delete the column or remove it from the SQL query)

After all modifications, our final report look like this :

Testing

When we’re done with the design, we will test the result in Report Builder before saving it to our production folder.

  • Click Run button on the top left

sccm 2012 custom reports

Go back and modify if needed, when you’re satisfied with the results, click Save button on the top left. The report is automatically available on your reporting point in the folder you specified.

Verification

By saving the report in Report Builder, your report will be updated in SSRS and in the SCCM console.

SSRS

SCCM Report Creation Console

  • From the SCCM console, go to Monitoring / Reporting / Reports. Your report should be published in your folder.

SCCM Report Creation

 

Your first report might not been the best one but with perseverance, you’ll get better and develop your skills. Happy reporting !

Founder of System Center Dudes. Based in Montreal, Canada, Senior Microsoft SCCM Consultant, 4 times Enterprise Mobility MVP. Working in the industry since 1999. His specialization is designing, deploying and configuring SCCM, mass deployment of Windows operating systems, Office 365 and Intunes deployments.
Step-by-Step SCCM Report Creation using Report Builder
5 - 4 votes

Leave a Reply

Your email address will not be published. Required fields are marked *