NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Dynamically Change the Report StyleSheets in TestStand.

Solved!
Go to solution

How to Dynamically Change the Report StyleSheets in TestStand.

0 Kudos
Message 1 of 17
(4,186 Views)

Hi HenryG,

 

What version of TestStand are you using? What operating system are you on? What environment are you developing your code modules in? What is the big picture of your application? Why do you need to change the stylesheet programatically? This will help me get a better idea of what to suggest.

 

Regards,

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 17
(4,168 Views)

Hi Perry,

 

I am using TestStand 3.1. Operating system is Windows 2003 server.  

I have some  test sequences which I’m  using  modified “ SequentialModel.seq” with modified “expand.xsl”  in “StyleSheets” and  some test sequences with modified  “ParallelModel.seq” with modified “expand.xsl”  in “StyleSheets”. My two reports are different.

I can make TestStand use a Particular Process Model with a Specific Sequence File but I still need to go to the TestStand “Configure” “Report Option” and select correct “expand.xsl” in “StyleSheets” folder.

I would like to select “expand.xsl” in “StyleSheets” folder programmatically or have my choice embedded in my test sequences so it will match my Parallel Model or my Sequential Model test sequence with correct StyleSheets.

 

Thank you,

Henry

0 Kudos
Message 3 of 17
(4,164 Views)

Hey HenryG,

 

The options set in the Configure»Report Options are stored in the ReportOptions parameter in the Report Options callback. 

 

You will need to add a sequence file callback, "Report Options". In here, drop a statement step to set Parameters.ReportOptions.StyleSheetPath equal to the path of your desired style sheet. You may want to just do this in the process models if it is going to apply to all sequence files under the process models. Otherwise, just use the model sequence file callback in your sequence file. 

 

Hope this helps,

 

 

Luke W

0 Kudos
Message 4 of 17
(4,135 Views)

Hi Luke,

 

I tried everything you suggested with no luck.

Will the sequence file callback work with the “On the Fly Reporting”? I have to use the “On the Fly Reporting” option to run my test sequences.

 

Thank you,

Henry

0 Kudos
Message 5 of 17
(4,108 Views)

 

Hey Henry,

 

Try using the RelStyleSheetPath parameter. I put this statement...

 

Parameters.ReportOptions.relStylesheetPath="C:\\Users\\ClarkKent\\Desktop\\test.xsl"

 

...in the report options callback and got it to work with normal and on the fly reporting. 

 

 

 

Luke W

0 Kudos
Message 6 of 17
(4,100 Views)

Hi Luke,

 

Thank you for your quick response.

Did you add a sequence file callback, "Report Options" and drop a statement step to set the RelStyleSheetPath parameter pointing to the StyleSheetPath folder?

 

Thank you,

Henry

0 Kudos
Message 7 of 17
(4,099 Views)

Hey Henry,

 

It was a process model callback to override the process model. So yes. You can add these by right-clicking the sequences pane, click sequence file callbacks, double click the report options, and click ok.

 

Luke W

0 Kudos
Message 8 of 17
(4,098 Views)

Hi Luke,

 

In my “SequencialModel.seq” in ReportOptions callback I added statement:

“Parameters.ReportOptions.RelStylesheetPath = "C:\\Documents and Settings\\HenryG\\Desktop\\TestStandModels\\StyleSheets\\expand.xsl".

Unfortunately it is still not working. It picks up report style sheet set in my TestStand Report Option GUI.

I also tried to add a sequence file callback “Report Options” in my test sequence and dropped the same statement there, same results.

 

Please advice.

Thank you,

Henry

0 Kudos
Message 9 of 17
(4,081 Views)

Thats strange. See if the attached sequence file works for you. You will, of course, need to change the path.

 

Luke W

0 Kudos
Message 10 of 17
(4,070 Views)