12-21-2011 04:23 PM
How to Dynamically Change the Report StyleSheets in TestStand.
Solved! Go to Solution.
12-22-2011 10:11 AM
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.
12-22-2011 11:27 AM
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
12-27-2011 02:39 PM
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
01-04-2012 02:23 PM
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
01-04-2012 04:48 PM
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
01-04-2012 05:08 PM
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
01-04-2012 05:12 PM
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
01-05-2012 01:56 PM
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
01-06-2012 11:15 AM
Thats strange. See if the attached sequence file works for you. You will, of course, need to change the path.
Luke W