NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Append a txt or doc file to a Teststand Report

How can I append an external doc or txt file ( that already exsists somewhere on my hard drive) to the report generated by Teststand 3.1 at the end of a "Test UUTs" seq run ?
0 Kudos
Message 1 of 11
(4,410 Views)
Clint,

What you can do is enable the ModifyReportFooter callback which will give you access to the Parameters.ReportFooter String. Next add an Action Step, in whatever langauge you want, and have that read the text file and pass the string back to teststand and append it to the Parameters.ReportFooter string.


Let me know if you need more details on how todo this. Have a great day!!

Allan S.
National Instruments
0 Kudos
Message 2 of 11
(4,384 Views)
Allen,
I created a LV7.1 vi that reads in a Word doc ( this is just a test .doc with "ABCD" in it). It needs work. When I run the vi I get characters displayed ( in LV) that aren't in the Word doc. Next I created a dummy seq and enabled the ModifyReportFooter callback . In this call back I added the vi and "mapped" the output to the Parameters.ReportFooter String. When I run it I only get the first few characters, maybe 3 or 4, not the whole doc. I'm using "Read from a text file.vi" shipped with LV examples. I modified it because I don't need all the other stuff ( plotting the points). Can you tell me why only the first few characters are printed in the Test Report and why I get characters in LV that I don't see in my Word doc?


Tried to attach both the vi and the seq. The attach would only allow one selection.
0 Kudos
Message 3 of 11
(4,362 Views)
Could you zip them and post them please. That would help me troubleshoot this issue. Thanks!

Allan S.
National Instruments
0 Kudos
Message 4 of 11
(4,339 Views)
A Word file is not a text file. A Word file contains all kinds of special control characters for formatting. You can save the Word file as a .txt file and that will strip out all of the strange characters that you're seeing. One thing that you don't mention is whether you are using the html, xml, or text reports. The TestStand text report viewer won't properly display a Word doc either. If you're using the html reports, then you would be better off saving the Word file as either .htm or .html.
0 Kudos
Message 5 of 11
(4,330 Views)
Hi

You can use Word's active X Api and TestStand's Active X steps to get the text out of the word file.

Regards
Anand Jain
National Instruments.
0 Kudos
Message 6 of 11
(4,320 Views)
Thanks everyone for your help. Two things I found and changed that really helped were the fact I was using HTML instead of txt in the report generation. I'm just going to use a txt file instead of doc. This eliminated the unwanted characters at the beginning and end of the document. I would like to know more about how to do it with Active X as suggested by Anand Jain if you could point me in the right.

Thanks,
Clint
0 Kudos
Message 7 of 11
(4,314 Views)
Hi
I have attached a sample TestStand Sequence file which gets the complete text from a word file using word's active x api and TestStand's active x steps.

Hope this helps.
Regards
Anand Jain
National Instruments.
0 Kudos
Message 8 of 11
(4,284 Views)
Could you save it in TS 3.0.0 ?

Thanks !
0 Kudos
Message 9 of 11
(4,240 Views)
Hi
I have attached the 3.0 version of the file.

Regards
Anand Jain
National Instruments.
0 Kudos
Message 10 of 11
(4,231 Views)