NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying 2 reports with one execution in the Operator Interface

Solved!
Go to solution
Is it possible to display two reports in the Operator Interface ( LabVIEW ) using two seperate ReportViewer UI Controls?  I have modified the SequentialModel.seq to generate both an html and a text report, but when run only the last report generated is displayed in the viewer.   I have attempted to use the DisplayReport UIMsg but I cannot seem to get it right because this is also called when the execution is completed.
 
The tests are being run in Single Pass with the idea that the text report ( formatted to 40 characters ) is displayed for operators to print on a strip printer.  The html report is generated ( for debug usage to include all steps ) but I have not figured out how to display it within another ReportView UI control.  Hence right now the html report is simply saved to the hardrive, it would be nice to have the html report also display in the viewer so an operator can easily print it out.
 
Thank you,
 
Paul Holzrichter.
0 Kudos
Message 1 of 4
(3,282 Views)

Hi Paul,

Since you already have the generated report files, it might be easier to simply use the LabVIEW controls to display the text file. For example, continue to open the HTML report using the TestStand ReportViewer and rather than using TestStand, open the ASCII Report using LabVIEW controls.

LabVIEW includes many examples to open and view a TextFile's contents.
You may find one at: C:\Program Files\National Instruments\LabVIEW 8.2\examples\file\smplfile.llb\Read from Text File.vi

Hope this helps.

Nestor
0 Kudos
Message 2 of 4
(3,260 Views)
Solution
Accepted by topic author Teds
Paul

The solution suggested by Nestor will work but I think I have got an easier solution.

1. Get TestStand to show text report using the existing mechanism.
2. Drop another ReportView control on your UI. Do not connect it to any of the managers.
3. Generate your html report and post a custom UI message give the UI the path of the html report.
4. Obtain the reference to the webBrowser control from the ReportView control using 'ReportView.GetHTMLCtrl '
5. Call Navigate method on the webBrowser control and pass it the path of the html report you created.
6. Clicking on the print button of the ReportView control should print the html report.

Let me know if it works for you.
Regards
Anand Jain
National Instruments

Message 3 of 4
(3,237 Views)

Yes, it worked.   The attachment is my screenshot of the code that is contained in my custom UIMessage handler for LabVIEW.  The StringData from the UIMessage is the HTML Report Path.

Thank you,

Paul Holzrichter



Message Edited by Teds on 03-27-2008 10:02 AM

Message Edited by Teds on 03-27-2008 10:05 AM

Message Edited by Teds on 03-27-2008 10:06 AM
0 Kudos
Message 4 of 4
(3,216 Views)