NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing ATML report header

Solved!
Go to solution

Excellent Roman... 

 

I have been trying to read through all the same useless rabble as you and NONE of it was helpful except your solution.

 

Thanks,

Tony

 

0 Kudos
Message 11 of 16
(1,635 Views)

Hi Tony,

The customization of the reports in TestStand is not "user-friendly", unfortunately... 

I'm very happy to hear that my solution is helpful to someone else 🙂 I use it in every project since I've discovered it.

Roman

0 Kudos
Message 12 of 16
(1,632 Views)

Hi,

 

Can you kindly share an example for the same? I am trying to use the same script but it's not working.

 

Thanks

Arijit

0 Kudos
Message 13 of 16
(1,539 Views)

1. Add the following expression to ModifyReportHeader Callback in your sequence (you should add the ModifyReportHeader Callback to your sequence and create a StationGlobal named SWversion in this example😞

Parameters.ReportHeader +="\t<tr:SWversion>\n\t\t<tr:Number value = \""+StationGlobals.SWversion+"\" />\n\t</tr:SWversion>\n"

StationGlobals.SWversion is the custom value that will be added to the report header.

2. Modify the TR5_Horizontal.xsl stylesheet (for ATML 5) - you should create a copy in TestStand Public directory and edit the copy, not the original file.  Add the following rows into <table class="uutTable"> after the SerialNumber (if you want the custom value to be shown after the serial number's row):

<tr>
  <td style="font-weight:bold;">SW version</td>
  <td>
  <xsl:value-of select="tr:ResultSet/tr:SWversion/tr:Number/@value" />
  </td>

</tr>

 

 

Here is a part of the modified stylesheet file for example, starting from the line with <table class="uutTable">

 

  <table class="uutTable">
   
   <tr>
    <td style="font-weight:bold;">Station ID</td>
    <td>
     <xsl:value-of select="tr:TestStation/c:SerialNumber"/>
    </td>
   </tr>
   
   <tr>
    <td style="font-weight:bold;">TE program version</td>
    <td>
     <xsl:value-of select="tr:ResultSet/tr:TEversion/tr:Number/@value"/>
    </td>
   </tr>
   <xsl:if test="string-length(tr:Extension/ts:TSResultSetProperties/ts:BatchSerialNumber/@value)!=0">
    <tr>
     <td style="font-weight:bold;">Batch Serial Number</td>
     <td>
      <xsl:value-of select="tr:Extension/ts:TSResultSetProperties/ts:BatchSerialNumber/@value"/>
     </td>
    </tr>
   </xsl:if>
   <xsl:if test="tr:Extension/ts:TSResultSetProperties/ts:TestSocketIndex">
    <tr>
     <td style="font-weight:bold;">Test Socket Index</td>
     <td>
      <xsl:value-of select="tr:Extension/ts:TSResultSetProperties/ts:TestSocketIndex/@value"/>
     </td>
    </tr>
   </xsl:if>
   <tr>
    <td style="font-weight:bold;">UUT Serial Number</td>
    <td>
     <xsl:value-of select="tr:UUT/c:SerialNumber"/>
    </td>
   </tr>
   
   <tr>
    <td style="font-weight:bold;">UUT catalogue number</td>
    <td>
     <xsl:value-of select="tr:ResultSet/tr:CatalogNumber/tr:Number/@value"/>
    </td>
   </tr>
 
   <tr>
    <td style="font-weight:bold;">Camera type</td>
    <td>
     <xsl:value-of select="tr:ResultSet/tr:CameraType/tr:Number/@value"/>
    </td>
   </tr>

 

0 Kudos
Message 14 of 16
(1,527 Views)

I don't know if this works with atml 2 or 5, but at least for atml 6 you can just run the following like of code anywhere in your client:

 

RunState.Root.Parameters.testsocket.UUT.AdditionalData.SetFlags("",0,PropFlags_IncludeInReport),

RunState.Root.Parameters.testsocket.UUT.AdditionalData.SetValString("Name",1,DataExpression)

 

Where "Name" is whatever you want to call it and DataExpression is whatever string you want to show it. This adds it to the UUT container in the Process Model under UUT.Additionalresults.Name. This does 2 things for you. in your test you can access that data by calling RunState.Root.Locals.UUT.AdditionalResults.Name (for a sequentioal model, it is a little different for parallel and batch as you will need to incluse socket numbers and things). IT also will add a row to the report header when viewed in explorer with the stylesheet. The Stylesheer bundled with Teststand already contains code to add to the header block of the viewable report anything in uut.additionaldata.

 

Cheers

 

 

 

Gregory Osenbach, CLA
Fluke
Message 15 of 16
(1,278 Views)

Thanks Gregory!

 

Your solution for ATML6 worked awesome for my situation except I had to use Locals instead of TestSocket:

 

RunState.Root.Locals.UUT.AdditionalData.SetFlags("",0,PropFlags_IncludeInReport)

RunState.Root.Locals.UUT.AdditionalData.SetValString(NAME,1,VALUE)

 

Using TestStand 2014...

 

Kevin

0 Kudos
Message 16 of 16
(1,071 Views)