Custom Report

If you create a new custom report, and choose the option to create a custom section, you can enter in the following Query:

select TC.TEST_CASE_ID, TC.NAME as TEST_CASE_NAME, INC.INCIDENT_ID, INC.NAME as INCIDENT_NAME, INC.INCIDENT_STATUS_NAME, INC.PRIORITY_NAME, INC.INCIDENT_TYPE_NAME
from SpiraTestEntities.R_TestCaseIncidents as TI
join SpiraTestEntities.R_TestCases as TC on TI.TEST_CASE_ID = TC.TEST_CASE_ID
join SpiraTestEntities.R_Incidents as INC on TI.INCIDENT_ID = INC.INCIDENT_ID
where TC.PROJECT_ID = ${ProjectId}
and INC.PROJECT_ID = ${ProjectId}
and INC.IS_DELETED = false
and TC.IS_DELETED = false
and TC.EXECUTION_STATUS_NAME = 'Blocked'

Then enter in the following XSLT Template:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:template match="/RESULTS">
    <table class="DataGrid">
	<tr><th>Test Case ID</th>
	<th>Test Case Name</th>
	<th>Incident ID</th>
	<th>Incident Name</th>
	<th>Incident Status</th>
	<th>Incident Priority</th>
	<th>Incident Type</th>
	</tr>
      <xsl:for-each select="ROW">
        <tr>
		  <td>TC:<xsl:value-of select="TEST_CASE_ID"/></td>
		  <td><xsl:value-of select="TEST_CASE_NAME"/></td>
		  <td>IN:<xsl:value-of select="INCIDENT_ID"/></td>
		  <td><xsl:value-of select="INCIDENT_NAME"/></td>
		  <td><xsl:value-of select="INCIDENT_STATUS_NAME"/></td>
		  <td><xsl:value-of select="PRIORITY_NAME"/></td>
		  <td><xsl:value-of select="INCIDENT_TYPE_NAME"/></td>
        </tr>
      </xsl:for-each>
        </table>
    </xsl:template>
</xsl:stylesheet>

That will generate a report of all blocked test cases and their associated incidents

What Does It Show

The report will generate something like the following table:

Blocked Test Cases to Defects Report
Test Case IDTest Case NameIncident IDIncident NameIncident StatusIncident PriorityIncident Type
TC:2Ability to create new book2IN:7Cannot add a new book to the systemAssigned1 - CriticalBug
TC:4Ability to create new authorIN:1Cannot log into the applicationNew Incident
TC:4Ability to create new authorIN:2Not able to add new authorNew Incident

and if you export to MS-Excel, something like this: