This recipe will walk you through the steps of using Report Builder 3.0 to create new reports for Service Manager. We will also show you how to create a custom folder structure in SQL Server Reporting Services to store your reports in.
Although Report Builder offers a visual wizard for creating the queries that will be used for retrieving data from the Service Manager Data Warehouse database, it is hardly possible to work with reporting effectively without at least knowing the basics of the SQL used for querying relational databases.
Furthermore, you will need to get familiar with the database model of the DWDataMart
database. Please refer to the Understanding the Service Manager Data Warehouse data mart recipe earlier in this chapter.
Also, you must install Microsoft .NET Framework 3.5 on all computers you intend to run Report Builder from.
First, we will create a custom folder structure in SQL Server Reporting Services to store our reports:
http://[SCSMDWSQL]/Reports
.http://[SCSMDWSQL]/Reports_[InstanceName]
.Custom Reports
, and optionally enter a description. Click on OK.Incident Management
, and optionally enter a description. Click on OK.ServiceManager
folder. You can break inheritance and apply custom permissions to your folders. Instructions on how to manage report permissions can be found in a later chapter.With the folder structure created, we are now going to create the report:
DWDataMart
database, you can choose the Use the current Windows user option and click on OK. Otherwise, you will need to provide the password of the Service Manager Reporting Account.
Left Table |
Join Type |
Right Table |
Join Fields |
IncidentDimvw |
Inner |
WorkItemDimvw |
EntityDimKey = EntityDimKey |
WorkItemDimvw |
Left Outer |
WorkItemAffectedUserFactvw |
WorkItemDimKey = WorkItemDimKey |
WorkItemAffectedUserFactvw |
Left Outer |
UserDimvw |
WorkItemAffectedUser_UserDimKey = UserDimKey |
IncidentDimvw |
Left Outer |
IncidentClassificationvw |
Classification_IncidentClassificationId = IncidentClassificationId |
IncidentClassificationvw |
Left Outer |
DisplayStringDimvw |
EnumTypeId = BaseManagedEntityId |
To do so, repeat the following steps 10 to 15 for each relationship in the preceding table.
join
field, double-click the space below the join field and click on the Add Field icon. Select the left and right join fields.
Field |
Aggregate |
IncidentDimvw.Id |
Count Distinct |
DisplayStringDimvw.DisplayName |
Grouped by |
UserDimvw.DisplayName |
Grouped by |
Field name |
Operator |
Value |
WorkItemAffectedUserFactvw.DeletedDate |
is |
(null) |
DisplayStringDimvw.LanguageCode |
is |
ENU |
Incidents by Affected User
.Affected User
.
Incident by Affected User
, and then click on Save.As you can see, the report that you created can now be opened either through the Service Manager console or by accessing SQL Server Reporting Services directly through your browser.
If you would like to edit the report, navigate to the folder where it is stored using your browser, hover over the report file, click the arrow next to the report, and then click on Edit in Report Builder.
Service Manager leverages SQL Server Reporting Services for providing rich reporting functionalities to the end users. As an administrator, you can create your own reports that access the DWDataMart
database provided by the Service Manager Data Warehouse server.
SQL Server Report Builder is a powerful tool that you can use to design your reports and save them to SQL Server Reporting Services. Using folders and security settings, you can establish a custom reporting structure with permissions that correspond to your organization's needs. All reports can be accessed either through the web browser, or you can use the Service Manager console to browse and consume your reports.
If you are authoring reports often, you might prefer to install Report Builder to your local computer. In this section, we will show you how to do this. We will also walk you through the process of editing SQL queries for your reports and copying existing reports.
Report Builder ships with SQL Server. As you have seen in the How to do it... section of this recipe, Report Builder can be streamed to your computer by clicking on the Report Builder button on the SQL Server Reporting Service web page. This allows you to manage your reports from virtually anywhere without the need to comply with any software requirements on the computer that you are working with.
However, if you mostly use the same computer to work with reports, you might want to install Report Builder, eliminating the need to stream the software to the computer every time you launch it.
You can download SQL Server 2102 Report Builder from the following URL:
https://www.microsoft.com/en-us/download/details.aspx?id=29072. During the installation procedure, the setup will ask you for the default target server URL. Enter the following URL if you are running SQL Server Reporting Services as a default instance:
http://[SCSMDWSQL]/reportserver
.
Replace [SCSMDWSQL] with the fully qualified domain name of the SQL server that is used for reporting. If SQL Server Reporting Service is running as a named instance, the syntax of the URL will be the following:
http://[SCSMDWSQL]/reportserver_[InstanceName]
.
When you are familiar with SQL, you might be faster to write the queries directly in SQL Server Management Studio. Use this query instead of walking through the wizard as described in this recipe. Click on the Edit as Text option in the Design a query dialog and paste the query directly in the editor. The following is the query that was used for the example in this recipe:
SELECT COUNT(DISTINCT IncidentDimvw.Id) AS [Count Distinct_Id] ,DisplayStringDimvw.DisplayName AS [DisplayStringDimvw DisplayName] ,UserDimvw.DisplayName AS [UserDimvw DisplayName] FROM IncidentDimvw INNER JOIN WorkItemDimvw ON IncidentDimvw.EntityDimKey = WorkItemDimvw.EntityDimKey LEFT OUTER JOIN WorkItemAffectedUserFactvw ON WorkItemDimvw.WorkItemDimKey = WorkItemAffectedUserFactvw.WorkItemDimKey LEFT OUTER JOIN UserDimvw ON WorkItemAffectedUserFactvw.WorkItemAffectedUser_UserDimKey = UserDimvw.UserDimKey LEFT OUTER JOIN IncidentClassificationvw ON IncidentDimvw.Classification_IncidentClassificationId = IncidentClassificationvw.IncidentClassificationId LEFT OUTER JOIN DisplayStringDimvw ON IncidentClassificationvw.EnumTypeId = DisplayStringDimvw.BaseManagedEntityId WHERE WorkItemAffectedUserFactvw.DeletedDate IS NULL AND DisplayStringDimvw.LanguageCode = N'ENU' GROUP BY DisplayStringDimvw.DisplayName ,UserDimvw.DisplayName
Designing reports can be a very time consuming process. Once you have established and designed a report, you might want to copy the report instead of starting from scratch. This allows you to maintain the layout of the reporting controls and other settings that you made in your report definition:
3.21.34.0