As much as possible, with Service Manager 2012, you will want to use what is provided out of the box, to avoid class and report customizations that can take a long time to be completed and will need maintenance in the future. However, very often, you won’t be able to avoid. This one came as a request from a customer. They wanted to use the out of the box Incident list report. This report will allow you to filter the Classification category of the incidents. However, you are not able to see to which category the incidents belong too unless you review the details of the Incidents:
And the resulting columns look like this:
Doesn’t it make sense to have a column showing the category of each incident, as below:
I believe so, and I will show you how to accomplish that.
First, let’s take a look at how the report has been built. MS often uses a good amount of code in the reports and also in the SQL engine, by using Stored Procedures. This is the case here.
By opening the report in Report Builder, you’ll notice right away that most of the data is based on expressions:
Let’s take a look at the dataset first:
As you can see below, the data is generated by an Stored Procedure:
You can actually find it in SQL Mgmt Studio:
And it looks something like this:
In order to spit out the Classification category, we need to add a few lines to it:
Around line 98, you should add the comma (,) and the line below.
After that, around line 150, you should add the highlighted LEFT OUTER JOIN:
And you should be good on the SQL side. Execute the Stored procedure to save it:
Now for the report. In Report builder, you will first need to update the fields, to add the category to the mix:
Hit Refresh Fields:
Once you do, you should see Category in the list:
You can now just drag and drop it to the existing table:
I Have changed the color to black (originally blue). I also have right-clicked the text box:
And set the Interactive Sorting:
Save the report and you can now run it from the Console!
Hope this helps!