NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get ATML 5.00 reports to show CR and LF

Solved!
Go to solution

Why do the TestStand reports convert/remove the EOL characters in the ReportText and String results?  Is there a way to overide this?

Example output of a multiline string:

 

\r \r BusyBox v1.13.2-CAv2 (2011-03-09 15:16:33 EST) built-in shell (ash)\r
Enter 'help' for a list of built-in commands.\r \r

 

Long multiline strings become unreadable.

0 Kudos
Message 1 of 18
(4,985 Views)

Try instead of using \r, use &#xA for a new line. Otherwise maybe &#10 for CR and &#13 for LF.

0 Kudos
Message 2 of 18
(4,961 Views)

Sorry Alex, that is not my question.  My string does have the correct CR and LF characters.  It is the process of creating the reports that is removing the CR and LF and adding in the /r and deleating the LF's.

 

The string above was entered into the ReportText of the step as:

 

"

 

BusyBox v1.13.2-CAv2 (2011-03-09 15:16:33 EST) built-in shell (ash)

Enter 'help' for a list of built-in commands.

 

"

 

Here is another example:

"This is a simple multiline string.\r Here is line two.\r Now line three.\r Four.\r Done..."

0 Kudos
Message 3 of 18
(4,952 Views)

Not sure if it works or not, but is there a reason you aren't using \n? The typical ways to end a line are either \n or \r\n, ending a line with \r is not a standard way of ending a line.

 

-Doug

0 Kudos
Message 4 of 18
(4,942 Views)

Why do you think I am not using LF (\n)?  The example I posted is the results after rendered by TestStands ATML report generator!  It is stripping the LF's and converting the CR's.  Trust me, my stirng has the proprer EOL.

0 Kudos
Message 5 of 18
(4,938 Views)

Ah, I see. Sorry I misunderstood. I think there is a way to modify the stylesheet to get it to insert HTML line breaks for line feeds. I'll ask someone who knows the details better to post an explanation or example.

 

-Doug

0 Kudos
Message 6 of 18
(4,906 Views)

Hi Paul,

 

This is a known issue with the ATML 5 stylesheets that ship with TestStand 2012.  Before explaining the issue, I'd like to provide little backround on how TestStand ATML reporting works, in case you are unfamiliar.  the TestStand ATML report generator creates an XML file which contains the raw results data.  This XML file is what validates against the ATML schema.  In order to view the report, we use a stylesheet (.xsl file), which allows you to generate a readable HTML report from the XML data.  For more information on how stylesheets work, refer to the w3schools article here:

 

http://www.w3schools.com/xsl/xsl_intro.asp

 

In regards to the issue you are seeing, there is an error in the ATML stylesheets where line break characters in ReportText are not correctly translated to the corresponding "<br>" tags in the generated HTML.  This is a known issue, and is under consideration for being fixed in a future TestStand version.  In the meantime, the attached stylesheets contain the fix for the issue.  Just replace the following files with the ones in the attached file:

 

<TestStand 2012>\Components\Models\TestStandModels\ATML\StyleSheets\TR5_Expand.xsl
<TestStand 2012>\Components\Models\TestStandModels\ATML\StyleSheets\TR5_Horizontal.xsl
<TestStand 2012>\Components\Models\TestStandModels\ATML\StyleSheets\TR5_report.xsl

 Let me know if you encounter any issues with the new files.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 7 of 18
(4,779 Views)

The results will not view in IE with these style sheets.  It does look correct when viewed in the OI or sequence editor's report viewer.

 

When viewed in IE all I see is the XML like this:

 

SequenceCall Main This is a simple multiline string.\r Here is line two.\r Now line three.\r Four.\r Done... Action Main WAS-NBKRL4 xml %$.13g True SpecifyByExpression Report DLL #FFFFFF #32FFFF #0000E0 #8000CC #000000 #00C4C4 #FF8000 #ADD8E6 #FF32CC #000080 #FF0000 #FF0000 #008000 #B98028 #008000 #FFCC33 #0000FF #FF0000 #FF0000 #00FF00 #FFFF00 #00FFCC #FFCC33 #FF2020 #D0D0D0 #00C4C4 TimeFirst BatchReport tr5_horizontal.xsl C:\Program Files (x86)\National Instruments\TestStand 2012\Components\Models\TestStandModels\ATML\StyleSheets\tr5_horizontal.xsl expand.xsl horizontal.xsl report.xsl trml.xsl TR_horizontal.xsl ATML5 "C:\\Test Development\\Reports\\<ClientFileName>\\<UUT> [<FileTime>][<FileDate>]<UUTStatus>.<FileExtension>" "<ClientFileDir>\\<ClientFileName>_Report[<FileTime>][<FileDate>]<Unique>.<FileExtension>" "<ClientFileDir>\\<ClientFileName>_BatchReport[<FileTime>][<FileDate>]<Unique>.<FileExtension>" "<ClientFileDir>\\<ClientFileName>_BatchReport[<FileTime>][<FileDate>]<Unique>.<FileExtension>" <CLIENTFILENAME><UUT><FILETIME><FILEDATE><UUTSTATUS><FILEEXTENSION> tr5_horizontal.xsl tr5_report.xsl tr5_expand.xsl WAS-NBKRL4 NONE

0 Kudos
Message 8 of 18
(4,769 Views)
Are you using TS 2012 or TS 2010 (5.0)?

The style sheet changes were made for TS 2010 reports.

Regards
Anand
0 Kudos
Message 9 of 18
(4,757 Views)

Al B.

I was comparing the two "horizontal" stylesheets (my existing one vs. your new one) in Beyond Compare and experimented by reverting portions of your changes.  I reverted one section back to its origional and it is now displaying correctly in IE.  However, I do not understand all the functionality of XML/XLS so I don't know if I broke anything else.  This attachement is the Beyond Compare report of my modified version to your version.  Can you evaluate why it now works and supply a new set of stylesheets?

Thanks,

Paul

0 Kudos
Message 10 of 18
(4,752 Views)