LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you print a single page of a multipage report.

I am using Office 2003 pro, the LabVIEW Report Gen Toolkit, LabVIEW 7.0, and Windows 2000. I have created a lengthy report with the first page being a summary. I would like the user to be able to select; print the entire report, or just the first page. Any ideas?
0 Kudos
Message 1 of 2
(2,823 Views)
There are two ways you could go about doing this. They both are somewhat straight forward.

1) Calling a macro from LabVIEW in Word.

You could create a macro that would let you just print the first page and call this from LabVIEW when the user so desires. There is an example of how to call a macro if you use the example finder. Goto

Toolkits and Modules>>Report Generation for Microsoft Office>>Run Macro on Word Table

2) You can actually modify the print VI that comes shipped with LabVIEW. For Microsoft Word it is called Work_Print.vi and it is located with in the exclsub.llb. This can be found at..

..\Program Files\National Instruments\LabVIEW 7.1\vi.lib\addons\_office\_exclsub.llb

You can also find this by digging through the Print Report.vi


Inside this VI you will see an Invoke node that has the fields To and From. If you specify the start and end page here, by connecting integer controls or constants, this will let you specify the pages to be printed out.

NOTE: If you modify the Work_Print.vi you may want to save it outside of this library and locally to your application directory. Therefore make sure any report VI you are using within your app. now dynamically references this local version of Word_Print not the one in the report library.


Please don't hesitate to let me know if you need more information or a more descriptive explanation.

Have a great day!

Allan S.
National Instruments
Applications Engineering
0 Kudos
Message 2 of 2
(2,823 Views)