Servicely Capability
Reports and Dashboards
Reports
17 min
a report provides visibility of a particular dataset that can be visually presented in different ways depending on the target audience and outcome it can be restricted to different users with different servicely system roles or groups, can be scheduled and can also be placed onto dashboards creating a report to create a report, navigate to reporting > reports > new report the following shows the navigation menu selections you may see as an administrator once there, populate the following fields true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type visibility restrictions a report’s visibility can be restricted by a combination of true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type please note that the visibility restriction/security of a report applies only to the report itself it does not apply to the underlying table and records that report is configured to show taking an example of a report for incident table, not only your report’s intended audience need to be able to view the report but they also need to have the permissions required to view the incident table and records shown in the report if a user is allowed to view a report but they do not have the permission to view the table/records the report is showing, then they will see a blank report administrative roles the following are the different system roles applicable to reports true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type advanced functions knowledge of both javascript and json is essential for configuration outlined in this section report debugging to find out the options passed to the reporting engine, for any given report, please ensure that you enable “report debugging information” via your user’s setting once enabled, view the report you want and it will return the json structure of the options that you can alter as outlined in the proceeding section of this article post processing reports that servicely generates can be further processed to tweak its appearances, such as around its labels, data it displays and groupings to do that set post processing flag to be “yes” write the required script in the “configuration” script field note that you will find similarities to a report template in terms of what you can configure, but in a slightly different syntax/format it is recommended to use this in conjunction with the report debugging option switched on the debugger is also aimed to make it easier to determine where you need to make changes, in the generated json object for a report, to achieve the outcome you need example 1 changing a number report to have $ prefix and decimal value to represent more accurate aggregate count original report view configuration script applied options servicely before = function( , hc) { hc setoptions({ lang { decimalpoint ' ', thousandssep ',' } }); }; //options series\[0] data\[0] y = 123456789 56; options plotoptions series datalabels format = '${point y , 2f}'; options; after the configuration script is applied example 2 adding label on top of individual columns of a grouped column chart original report view post processing script applied let datalabelstyling = { "fontfamily" "\\"source sans pro\\", helvetica, sans serif", "color" "#495674", "fontsize" "13px", "fontweight" "500", "fontstyle" "normal" } options plotoptions column datalabels = {}; options plotoptions column datalabels style = datalabelstyling; options plotoptions column datalabels enabled = true; options; after the post processing script was applied example 3 adding percentage and count to label of each grouping in a pie chart original report view post processing script applied // 1 append total counts to the data labels let totalcount = 0; if (options series length > 0) { // 1 a get total count first by going through each grouping's value and tally them up options series\[0] data foreach( elem => totalcount += elem y); // 1 b go through the list again, to calculate percentage and append to the data labels options series\[0] data foreach( elem => { let percentage = math round(( elem y / totalcount) 1000) / 10; elem name = elem name + " " + percentage + "\\% (" + elem y tostring() + ")"; }); } options; after the post processing script was applied example 4 aggregating total open tickets across multiple tables report will by default return total counts per individual table for example if you are reporting off work or itsmwork table, the total counts will be spread across individual child tables original report view on itsmwork post processing script applied let seriesdata = options series\[0] data; let grandtotal = 0; let allrecordidsarr = \[]; // 1 get grand total seriesdata foreach(function( elem) { grandtotal += elem y; allrecordidsarr = allrecordidsarr concat( elem ddids); }); let newdataset = \[]; newdataset push(seriesdata\[0]); newdataset\[0] y = grandtotal; newdataset\[0] ddids = allrecordidsarr; options series\[0] data = newdataset; options; after the post processing script was applied example 5 always show the table underneath the chart with the numbers post processing script applied options servicely before = function( , hc) { hc setoptions({ }); }; options exporting = {}; options exporting showtable = true options; example 6 changing data label to be more intuitive for certain reports, you may need the reports to show the labels in a more intuitive way e g if you are reporting on slas grouped by their “slamet” flag, format wise, you will get something similar to the following but you can apply post processing script for the data label to be more meaningful, for example, “sla met” when slamet field = true and “sla breached” when slamet field = false; post processing script applied if (options series length > 0) { options series\[0] data foreach( elem => { if ( elem name == "true") { elem name = "sla met"; } else if ( elem name == "false") { elem name = "sla breached"; } }); } options; after post processing script is applied template this field is located under a report definition’s appearance tab it references the “report template” table where you can create your own by navigating to reporting > reports > all report templates the following are the fields on the report template form true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example 1 changing a number report template to have $ prefix and decimal value to represent more accurate aggregate count original report view modify the “servicely” option to be servicely { before function(report, highcharts) { report singledatapointaggregation(this); highcharts setoptions({ lang { decimalpoint ' ', thousandssep ',' } }); } } then, modify the plotoptions to have its series' datalabels' format to be plotoptions { series { datalabels { format '${point y , 2f}', }, } after the configuration script is applied