How to tell if a report is being used on a Dashboard?

Charlotte King
Giga Contributor

Hi, 

Is there a way of telling if a report has been used in a Dashboard within the reporting list? I want to tidy up some reports but want to make sure I don't delete any that appear on Dashboards. 

Thanks,

Charlotte 

2 REPLIES 2

Willem
Giga Sage
Giga Sage

You need to create a Database view for this.

 

A detailed description on how to do this for exactly your question of seeing what reports are used in what dashboard can be found here:

https://community.servicenow.com/community?id=community_blog&sys_id=c3ecf2351bfbdc90d2ccea89bd4bcb82

 

Create a Database View

Navigate to Database Views and click “New”.

Note: Creating a database view requires admin access.

Once there, give the view a Name and fill out the Label, Plural (Label), and Description.

image

What these are isn’t necessary since they are just labels but remember what you used. Once this is complete, right-click on the header and click “Save”.

Add the Tables

Now that we have a view, we need to specify what tables to use. This view requires more tables than I usually use, given the complexity of the data. Here are the tables we need to add along with the variable prefix and where condition.

Table 

Order 

Prefix 

Where 

Left Join 

pa_m2m_dashboard_tabs 

 

100 

dt 

 

false 

pa_tabs 

200 

dt.tab = t.sys_id 

false 

sys_portal 

300 

t.page = p.page 

false 

sys_portal_preferences 

400 

prefrend 

p.sys_id = prefrend.portal_section && prefrend.name = 'renderer' && prefrend.value = 'com.glide.ui.portal.RenderReport' 

false 

sys_portal_preferences 

500 

prefrep 

p.sys_id = prefrep.portal_section && prefrep.name = 'sys_id' 

false 

sys_report 

600 

rep 

prefrep.value = rep.sys_id 

false 

report_stats 

700 

repstat 

rep.sys_id = repstat.report_sys_id 

true 

Tip: You’ll notice that pa_dashboards is NOT included in this view. This is not needed because pa_m2m_dashboard_tabs includes a reference to Dashboards so you can dot-walk to the Dashboard record if you want information from that record (like Owner or Group).

What my final view looks like:

image

 

 

Thomas_Davis
Administrator
Administrator