Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > Custom Report Builder Que...

Custom Report Builder Question RSS Feed

Friday, September 20, 2013

I have the following query:

select REL.Version_Number, REQ.Requirement_ID, REQ.Name as Req_Name, T.Task_ID, T.Name as Task_Name, T.Task_Status_Name
from SpiraTestEntities.R_Releases as REL
left outer join SpiraTestEntities.R_Requirements as REQ on REL.Project_ID = REQ.Project_ID and REL.Release_ID = REQ.Release_ID and REQ.Is_Deleted=false
left outer join SpiraTestEntities.R_Tasks as T on REL.Project_ID = T.Project_ID and REL.Release_ID = T.Release_ID and REQ.Requirement_ID = T.Requirement_ID
where REL.PROJECT_ID = ${ProjectId}
order by REL.Release_ID, T.Task_Status_ID

and I'm trying to build the template for the site to display the data like so:


Version_NumberRequirement_IDReq_Name Task_ID Task_Name Task_Status_Name 403 Build Something   
    20 Do Task 1 Completed
    22 Do Task 2 Accepted
    23 Do Task 3 Rejected

Is there an easy way to build a template for this?  The template I currently have is:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:template match="/RESULTS">
    <table class="DataGrid">
   <td><xsl:value-of select="Version_Number"/></td>
   <td><xsl:value-of select="Requirement_ID"/></td>
   <td><xsl:value-of select="Req_Name"/></td>
      <xsl:for-each select="ROW/Task_ID">
   <td><xsl:value-of select="Task_ID"/></td>
   <td><xsl:value-of select="Task_Name"/></td>
   <td><xsl:value-of select="Task_Status_Name"/></td>






2 Replies
Adam SAdam S
re: Mike Clarkson on Friday, September 20, 2013
Tuesday, October 8, 2013
Anyone have any suggestions?
Jon FreedJon Freed
re: Mike Clarkson on Friday, September 20, 2013
Wednesday, August 20, 2014
Try nested for-each tags?

The first would be for releases, the second would be for release-requirements, and the third would be for release-requirement-tasks.

Something like this (and yes, this pseudo code is definitely not valid/well-formed):

<for-each release>
td version number (with col span)
<for each requirement>
td empty col (with col span as desired to span the rel col(s))
td req id (with col span as desired to span the task col(s))
<for each task>
td empty col (with col span as desired to span the rel and req col(s))
tds for task cols
</for each task>
</for each req>
</for each rel>

  • Started: 9/20/2013
  • Last Reply: 8/20/2014
  • Replies: 2
  • Views: 882
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2017 | Licensed to Inflectra Corporation.