From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Test Reports (automatic printing) from TestStand using Win 7 OS

Hi

Subject: Printing Test Reports (automatic printing) from TestStand using Win 7 OS

 

For production testing, we need to be able to print the test report after each test (without having to stop the test sequence).   I have used the SequenctialPrinitng Model with Win XP, but have had trouble when migrating over to Win 7.

 

Reviewed the article below, this seems possible.  However, I am not sure how to get the version of MS XML and the IXMLDOMDocumentX version referenced in the Note section below.

 

Thanks

Bill

 

Programmatic Printing of TestStand Reports - Modular

Publish Date: Feb 27, 2013 | 1 Ratings | 4.00 out of 5 | Print | Submit your review

Overview

This example code allows you to automatically print your testing routine reports after every test, when the test fails, when the test passes, or never.

TestStand does not have a option that allows the user to automatically print their test reports.  This example provides a sequence file containing two sequences that first converts an XML report to an html file, if necessary.  It then uses the Internet Explorer ActiveX server to print the html report.  This pair of sequences will print all four types of TestStand reports, and is configurable to only print when desired.  These sequences have been designed with modularity in mind, so that they should be able to be taken in their current form and placed in any process model that generates test reports.  Also, because of this modularity, you can use only the XML conversion sequence if you wish to only convert your XML document to an html document, although this is not covered in the readme.  For a more integrated approach, see the example program "Programmatic Printing of TestStand Reports".

To use this example, unzip the contents of printingsupport.zip and follow the instructions in the readme file.

Note: If you are using Windows 7, the ActiveX/COM steps ("Load the XML Report", "Load the StyleSheet", "Transform XML to HTML") in the subsequence titled "Convert XML report to HTML" may not have a reference to the correct Automation Server. Please check this subsequence and make sure that you are referencing the Automation Server "Microsoft XML, vX.X (Ver X.X)", where X.X is the version number of the Microsoft XML Automation Server on your Windows 7 machine. Also, ensure that the Object Class is DOMDocument (IXMLDOMDocumentX) where X is the version of the Object Class specified in the Module Settings. 

0 Kudos
Message 1 of 5
(4,258 Views)

I use the IWebBrowser2 Method, which essentially opens your XML in IE and then prints it.  The ReadyState property is needed in case the file is large and IE takes a long time to open/convert the file.

 

Pulido Technologies LLC

 

Print from IE.PNG

0 Kudos
Message 2 of 5
(4,251 Views)

Hi,

 

Thanks for that method, however I am not experienced enough with LabView and am looking to use the Programmatic Printing of TestStand Reports - Modular method for Win 7 OS.

 

Not usre how to get the version number of the Microsoft XML Automation Server on the Windows 7 PC, and the he version of the Object Class specified in the Module Settings as mentioned in the Note section of the 'Programmatic Printing of TestStand Reports - Modular' NI article

 

...the Automation Server "Microsoft XML, vX.X (Ver X.X)", where X.X is the version number of the Microsoft XML Automation Server on your Windows 7 machine. Also, ensure that the Object Class is DOMDocument (IXMLDOMDocumentX) where X is the version of the Object Class specified in the Module Settings. 

 

 

 

0 Kudos
Message 3 of 5
(4,228 Views)

Here is what I was able to do.  I happen to have XML v6, which has higher security settings, so in my short time playing around, I couldn't get the transform step in the example to work.

 

Pulido Technologies LLC

 

pick xml.PNG

0 Kudos
Message 4 of 5
(4,218 Views)

Hello,

We have a Test Station running Test Stand 4.2 right now.   Our customer's engineer, who knows this software, has left the company and we are a bit shackled right now.  The original test log report routine, wants to send the test log data to a remote server.  The remote server does not exist, and we are stuck right now trying to reconfigure this step.  We went to break this config and just store data to a local HD for later printing right at the factory.  This must be somewhat of a generic step in Test Stand usage...!  I will be going after training but right now, need a quick answer.  Thanks for the help!!  

Rick   -   WYCOM Corp San Diego

0 Kudos
Message 5 of 5
(2,700 Views)