Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating Reports from Templates (Report Generation Toolkit)

You can use the MS Office Report Express VI to create a report from a Microsoft Word or Microsoft Excel template. Word and Excel templates contain placeholders for data and components that are common to all reports. The MS Office Report Express VI inserts data into the placeholders so you can display, print, or save the resulting report.

The LabVIEW Report Generation Toolkit for Microsoft Office includes basic templates for Word documents and Excel worksheets. These templates are located in the labview\templates\Report directory.

Complete the following steps to use the MS Office Report Express VI to create a report from a basic Word template.

  1. Place the MS Office Report Express VI on the block diagram. 
  2. In the configuration dialog box that appears, select Basic Report for Word from the Template drop-down menu.
Note  Do not change the Report Generation Toolkit basic templates for Word and Excel. If you want to edit the basic templates, save them with different filenames and select Custom Report for Word or Custom Report for Excel in the configuration dialog box of the MS Office Report Express VI.
  1. Click the Author_Name item in the Bookmarks in the Selected Template list. Each item in this list represents a placeholder in the template.
  2. Select Fixed Value from the Value Source drop-down menu.
  3. In the Fixed Value text box that appears, enter your name.
  4. Repeat steps 3 through 5 for the Company_Name and Report_Title_Main items in the Bookmarks in the Selected Template list. Enter My First Report for the Report_Title_Main item.
  5. Click the Graph1_Data_Input item in the Bookmarks in the Selected Template list. Verify that the Value Source for this item is Input and that the Input Appearance in Report is Graph.
  6. In the Report Destination drop-down menu, select Open in Microsoft Office.
  7. Click the OK button to close the configuration dialog box. The Express VI icon on the block diagram displays inputs for all the bookmarks configured with a Value Source of Input.
  8. Place the Simulate Signal Express VI on the block diagram. 
  9. Click the OK button in the configuration dialog box that appears.
  10. Wire the Sine output of the Simulate Signal Express VI to the Graph1_Data_Input input of the MS Office Report Express VI.
  11. Run the VI. Notice that the generated report opens in Microsoft Word and contains the text you entered for each placeholder in the template as well as the sine wave you created with the Simulate Signal Express VI.

Refer to the following VIs for other examples of using the MS Office Report Express VI to generate reports from templates.

  • labview\examples\office\Excel Reports.llb\Generate Report From Template (Excel).vi 
  • labview\examples\office\Word Reports.llb\Generate Report From Template (Word).vi 

You can create custom report templates in Word and Excel to ensure a consistent appearance in multiple reports. Use templates to define page size, text formatting, and other aspects of report appearance. You also can specify placeholders for text, tables, graphs, and images. Both Word and Excel provide ways to insert placeholders into documents and worksheets. Use bookmarks in Word and named ranges in Excel to define placeholders.

Refer to the Microsoft Word Help or Microsoft Excel Help for more information about creating templates.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit