Skip to main content
1-Visitor
April 1, 2015
Solved

Rich Content in Report

  • April 1, 2015
  • 2 replies
  • 2230 views

When I try to output a text field from a Test Result Related Item that contains rich content to an HTML report, all of the < and > are replaced by &lt; and &gt;. This happens with some other characters also. How do you get it to preserve the HTML instead of doing this conversion? Below is where I am trying to use it. Basically I'm trying to output all ALM_Defect items from a test session. This doesn't happen for fields on the Test Session itself though.

<%begintestresultdetail verdict=&combinedverdictfilter %>

<%begintestresultitemdetail%>

<table>

<script type="text/javascript">

<!--

var itemId = "<%testresultitem ID%>";

var itemType = "<%testresultitem Type%>";

var desc = "<%testresultitem ALM_Description%>";

if (itemType == "ALM_Defect") {

document.write("<tr><td class='noBorder'>" + itemId + "</td><td class='noBorder'>" + desc + "</td></tr>");

}

-->

</script>

</table>

<%endtestresultitemdetail%>

<%endtestresultdetail%>

    Best answer by dmirkovic

    Defect posted under ID 1035853.

    2 replies

    16-Pearl
    April 1, 2015

    Please ensure your resort recipe starts with

    <html>

    and end with

    </html>

    This affect the "interpretation of richt content" by the report generator.

    If you write an XML report, you need an element

    <html>TRUE</html>

    to get the same effect.

    HTH Matthias

    1-Visitor
    April 1, 2015

    The report does have the html tags. It's a properly formatted html report. Other rich content fields that come directly from the test session render just fine. It's only the rich content fields that are related through test result items that are replacing the < and > (as well as some other characters).

    dmirkovic12-AmethystAnswer
    12-Amethyst
    April 8, 2015

    Defect posted under ID 1035853.