Page 1 of 1

Custom report template

Posted: Wed Feb 12, 2014 4:13 pm
by UgaAga
Hi,
how is it possible to write the error message of a test iteration into its header?
I modified the xsl by

<xsl:if test=".//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>

Now the error message will be shown in the header of the iteration but also in the header of the parent iterations. How will the message be written only into the corresponding iteration?

Many thanks

Re: Custom report template

Posted: Thu Feb 13, 2014 5:18 pm
by Support Team
Hi,
In order to write the error message to the header of the test iteration insert your code at following position within your *.xsl-file :

Code: Select all

<xsl:if test="./datarow/field">
	<div class="datarow">
		<xsl:apply-templates select="./datarow"/>
						
		<xsl:if test=".//item[@level='Error']">
  <span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
		</xsl:if>   

  </div>
		</xsl:if>
Regards,
Robert

Re: Custom report template

Posted: Wed Feb 19, 2014 11:51 am
by UgaAga
Hi Robert,
thanks for your answer, but i would like to write the error message to the title of each iteration. Sorry that didn't make that clearer.

Best regards

Re: Custom report template

Posted: Wed Feb 19, 2014 4:56 pm
by Support Team
Hi UgaAga,

Nothing to worry about. Please add your code add the following position to your *.xsl file:
<li class="{@result} iteration" id="iteration{@rid}">  
			<h2 class="{@result}" onclick="OnLoadContentDynamic('{@rid}','iteration',this);">
				<span class="ui-status-icon"></span>
				<xsl:choose>
					<xsl:when test="@type='test case iteration'">Iteration: </xsl:when>
					<xsl:otherwise>Repeat: </xsl:otherwise>
				</xsl:choose>
				<xsl:value-of select="./@iteration"/>
				
					<xsl:if test=".//item[@level='Error']">
						<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
      
					</xsl:if>
The report should look somehow like this, after you inserted the code:
CustomizedReport.png
Regards,
Robert

Re: Custom report template

Posted: Wed Feb 19, 2014 5:56 pm
by UgaAga
Hi,
ok but in this case the error message will also be shown in the header of the parent iteration. This isn't what i would like to have. How can is it possible to prevent this?

Bye

Re: Custom report template

Posted: Tue Mar 04, 2014 10:58 am
by UgaAga
...

Re: Custom report template

Posted: Wed Mar 05, 2014 4:12 pm
by Support Team
Hello,

Unfortunately we cannot provide a solution for this issue since it is a highly customized solution and it diverges too far from our support field. Thank you for your understanding.

Regards,
Robert

Re: Custom report template

Posted: Fri Mar 07, 2014 3:50 pm
by UgaAga
No problem i found the solution on my own

<xsl:if test="./activity/item[@level='Error'] or ./activity/activity[@type='test module' or @type='module group']//item[@level='Error']">
<span class="message"> - <xsl:value-of select=".//item[@level='Error']"/></span>
</xsl:if>