06-28-2013 09:20 AM
Hello everyone!
I have searched the internet and a lot of the NI forums and haven't found any answers to the problem I am having. So hopefully someone else has been able to figure this out and could shed some light down on it!
I am looking to print 3 seperate tabs in one word document. I keep tweeking the code I'm using to try to do this but I am unable to get it right.
This is my current line of code and what I'm getting is the same tab that is open (gamma) and it prints it three times in seperate word documents. I was wondering if there is a way to get the 3 seperate tabs printed all in the same word document?
Thanks!
Brandon Deal
Solved! Go to Solution.
07-01-2013 11:06 AM
Hi Brandon,
From your screenshot it looks like you might be creating a new report in each case of your tab case structure (Gamma, Phase, etc). I would suggest moving the New Report.vi, the Set Report Margins.vi, and the Set Report Header Text.vi outside of your While Loop and have those run before entering this case structure. I would also move the Save Report to File.vi to run after the While Loop has finished executing. What this does is create a new report once before the loop; after that, each iteration of the loop will append information to the same report. After we’re done appending information to the report, we save the report to the word doc.
07-01-2013 01:22 PM
Perfect! Makes so much sense, I'm going to try it out. Now another question. When I'm appending these front panel images to the report, how can I make it to where the images will come up on 3 seperate sheets on the Word Document? Any ideas?
Thanks again for the solution!!
07-01-2013 02:53 PM
You can use the "New Report Page.vi" before appending text to the word document to do that. The VI is located in Functions Palette>Programming>Report Generation>Report Layout> New Report Page.vi
Hope this helps and good luck.
07-01-2013 02:59 PM - edited 07-01-2013 02:59 PM
Actually after running the program with everything outside of the while loop all of the screen shots of the Front Panel go to their own page already! So the New Report Page isn't necessary (unless someone wants blank pages in between their documents...)
Thanks again Gabriel! This should help other struggling LabVIEW users trying to print out tabs in Word Documents. If anyone wants, I can also screenshot my final setting so that one can see how I finally implemented it.