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.

Example Code

Open and Print Existing HTML Report using Report Generation Toolkit

Code and Documents

Attachment

Overview

This example VI shows how to programmatically open an existing HTML report created using the LabVIEW Report Generation Toolkit and send this existing report to a printer.

 

Description

This example uses Report Generation Toolkit to open an existing HTML report. And the report is programmatically sent to a printer and will be printed. The type of the report could be changed to Word, Excel or General report in block diagram by simply select from the enum.

 

Requirements

  • LabVIEW 2012 (or compatible)
  • LabVIEW Report Generation Toolkit for Microsoft Office 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the attached folder to your computer
  2. Open the VI " Open and Print HTML Report 2012 NIVerified.vi".
  3. Run the VI.
  4. When prompted, navigate to the file path of the saved HTML report that you previously created and saved.
  5. The report is sent to the default printer and opened in a web browser for you to view.

 

Additional Information or References
VI Snippet

Block Diagram.PNG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Regards,
Austin S.

National Instruments
Academic Field Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.