NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Create indentation programatically in report file?

Hello community,

 

From time to time it would be nice to indent a given step in the report. I could surround it with a for loop or so, but I am wondering if there is a more elegant way to do it?

 

thanks.

0 Kudos
Message 1 of 7
(1,566 Views)

Hi,

 

Are you just looking to customize the appearance of the report? Let us know exactly what you want so the community can provide some possible solutions.

 

Michael B.

Applications Engineer

National Instruments 

0 Kudos
Message 2 of 7
(1,536 Views)

Hey Michael,

 

If I have a step in a for loop executing lets say 5 times, then it appears in the report 5 times and all these 5 entries are indented. The more nested loops I have the more indentation I get in the report for a given step.


In the sequence I work on at this moment I dont use any nesting, but for some tests it would be nice if they would show up in the report indented. It would increase the readibility of the report a lot.

 

Is there a way to programatically achieve this, or do I really need to put a for loop around the step? This latter solution would be pointless in the sense that it makes my sequnce look more complicated than it is really.

 

Thanks.

0 Kudos
Message 3 of 7
(1,528 Views)

Hi,

 

The easiest way to improve readability of your reports is to change the style sheet in the Report Options window. Navigate to Configure » Result Processing to launch the Report Options dialog, then select the Options icon for the Report Generation plug-in. Then select the Style Sheet dropdown and select either tr5_expand.xsl or tr5_report.xsl. Both of these report styles are more readable.

 

Michael B.

Applications Engineer

National Instruments 

 

0 Kudos
Message 4 of 7
(1,522 Views)

Hi,

 

To figure out how to add the indents in the report can you answer the following questions:

  • What type of report are you using (ASCII, HTML, XML or ATML or another type)?
  • How exactly do you want it indented? Do you want each step on alternating indent levels to separate them? Do you want each step indented or just some?

 

Michael B.

Applications Engineer

National Instruments 

0 Kudos
Message 5 of 7
(1,517 Views)

Hi,

 

I'm using the built-in "expand.xsl" stylesheet to generate my xml reports.

As I have described above, I'm looking for a way to indent some of my steps programatically.

 

thx.

0 Kudos
Message 6 of 7
(1,511 Views)

Hi,

 

It looks like to implement the functionality you desire you will need to modify the stylesheet. Here are some resources to help you out:

 

How to Modify a TestStand XML Report Header

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAIBSA4

 

Customizing XML Report Style Sheets

https://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/customizing_stylesheet...

 

There are still other options that can be explored to make your reports more readable. Some examples could be creating a summary report, removing non essential information from the report, or modifying the background cell color based on the step. 

 

Michael B.

Applications Engineer

National Instruments 

0 Kudos
Message 7 of 7
(1,506 Views)