07-01-2013 10:44 AM
Hello,
I need to display custom information on my xml report header. To be specific, I am trying to display the for loop count on the report header.
Any ideas on how to do this?
Thanks a lot in advance!
07-02-2013 12:49 PM
Hey nikk07,
There are a couple of ways we can do this. The changes need to be made to the test sequence to save the value of a given variable to the generated XML file. You can use ModifyReportHeader callback to make the changes.
I found these steps in this KnowledgeBase Article:
http://digital.ni.com/public.nsf/allkb/17ABBD0BF2A60D908625774200798869
and found this example:
https://decibel.ni.com/content/docs/DOC-12617
You may also want to read through the Best Practices for TestStand Report Generation and Customization. There is a lot of good information in that article that may come in handy down the road.
http://www.ni.com/white-paper/8289/en
Best Regards,
-KP
07-02-2013 01:59 PM
Kurt,
Thank you! I tried that method earlier but I could not make it generate my new text. For the third step, I inserted a statement in the ModifyReportHeader sequence and added the expression "Parameters.ReportHeader += Locals.CustomText.GetXML(XMLOption_NoOptions, 0, "CustomText", Parameters.ReportOptions.NumericFormat)" in Expression in the step settings pane.
Can you please tell me if I am doing anything wrong there?
Thanks again!
07-03-2013 09:11 PM
Hey nikk07,
Did you make the modifications to the horizontal.xls file? You need to do this within the .xls file located in
C:\Program Files (x86)\National Instruments\<TestStand Version>\Components\Models\TestStandModels\StyleSheets
I recommend making a file called horizontal_original so you have one to go back to before you start editing it. Also, you need to open the file with administrative privileges in order to edit it. Also, make sure the statement is in the ModifyReportHeader callback.
This may come in handy later. It is the help file on stylesheets and give a lot more information to what is in the file:
http://zone.ni.com/reference/en-XX/help/370052H-01/tssuppref/infotopics/report_stylesheets_details/
Best Regards,
-KP
07-08-2013 07:38 AM
Kurt,
Yes I modified that as well. I inserted the following statement,
<font face = "VERDANA" size = "4" color= "#003366">
<xsl:value-of select="//Report/Prop[@Name='CustomText']"/>
</font>
I inserted that right after the statement:
<font face = "VERDANA" size = "4" color= "#003366">
</font>
It still did not work.
Here I have attached what I've got so far.
Thanks!
07-09-2013 07:40 AM
That sequence makes the same calls that mine does so the problem must lie within xls file or the station options.
Is there any report being generated from the test?
Just to verify, can you paste the directory the .xls file is found in?
What version of TestStand are you using?
Try the version of horizontal.xsl I attached and let me know if it works. You will need to extract it first.
07-09-2013 09:45 AM
This is the file path of the location the horizontal.xsl file is saved in my computer.
C:\Program Files\National Instruments\TestStand 2010\Components\Models\TestStandModels\StyleSheets
There is a report being generated, but it does not display my new text.
I am using TestStand 2010.
And I tired it with the file you attached, but still did not work.
Thanks again.
07-10-2013 05:57 PM
nikk07,
Here is everything that I have made to make this work (in the attachment). I have a few more ideas, lets put a breakpoint in the ModifyReportHeader statement just to make sure we hit it. I did this in TestStand 2010 4.5.1. I included my report as well so you can see what it looks like. Also can you double check the the horizontal.xsl file is edit? There were a few issues I ran into with permissions when I was trying to edit the file, maybe there is something blocking the file from being altered. Lastly what is the process model set to on your station? Mine is using the SequentialModel.Seq.
07-17-2013 11:42 AM
So it turns out that my modify report header callback does not work as expected when On the fly report generation option is enabled. I read another thread about that problem here.
Thanks a lot for your help!
07-18-2013 09:35 AM
Thank you for posting what was happening, just in case anyone else runs into the same issue. This is also good for me to note that on the fly reporting disables this kind of callback. Thanks again for the knowledge.
Best,
-KP