Table of Contents

Drilldown Reports

Author: Samuel Costa

This assumes you have already created basic and column reports and know how to use variables on the reporting manager

A drilldown report is a type of report that displays more detailed information from the data in another report.

A good example of drilldown report would be the Ticket List By User report, which is a drilldown of the Tickets Closed Per User report. After running the Tickets Closed Per User, if you click in one of any columns, it will run the Ticket List By User report for that specific user.


Creating a Drilldown Report

The drilldrown report itself works exactly as any other report in the reporting manager, the only difference is how it is accessed. Nom admin users will not be able to see the drilldown report in the report list and The only way for them to run the drilldown will be through the parent report.

For Chart Reports

In order to make the drilldown accessible from the parent report, you have to pass a map object in addition to the column data. This map needs to have the following format:

[description:“DrilldownReportName,variableName:VariableValue”]

This string will contain the title of the drilldrown report, the variable names and their values:

chart.addData("ColumnName", 
               ColumnValue, 
               [description:"description:DrilldownReportName,variable1Name:VariableValue,variable2Name:variable2Value"] 
              ) 

For instance, The code below (extracted from 'Tickets closed by user' report) will create run the report named “Ticket List By User - Drilldown” passing the values for the variables “login”,“startDate” and “endDate”

    db.eachRow(query){
  chart.addData(
                      it.Name,
                      it.Count,
                      [description:"drilldown:Ticket List By User - Drilldown,login:${it.login},startDate:${startDate},endDate:${endDate}"])
              }  

For Table Reports

In your ReportTable set the drillDown variable to the name of the report you wish to act as the drilldown.

    def table = new ReportTable(title: "Parent Report Title",drillDown: "Drilldown Report Title")

When you double click any row of the table it should open the drilldown report passing each each of the values for that row as the variable map for the drilldown. This is done by concatenating the table headings and row values as a string with ':' separating each key and value and ',' separating each pair in the map. This can make using values that have commas or colons (like dates) in your drilldown quite awkward.

Additionally any column names that start with “hidden_” has that part of the name removed before being passed into the map as a key and columns whose names start with “_” are entirely ignored.


Drilldown Report Checklist

Besides the standard checklist for all reports, make sure that:


Self Assessment

Make a copy of the column report that you created as part of the previous assessment and add a drilldown to the columns. The drilldown report should be a table report that lists the tickets from the market/visibility clicked by the user on the parent report for that date range.