LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use more than 17 inputs using MS Office Report express vi?

I am trying to generate a rather long report in MS Word and the express vi will only let me use 17 inputs, so I tried converting to a regular vi and generating the inputs myself, but only the firs 17 show up on the report, so the ones I added do not seem to work. 
0 Kudos
Message 1 of 20
(5,429 Views)

Hi Homer,

The internals of the Express VI only allow 17 dynamic inputs for report content.  You can configure some inputs to be static values through the Express VI.  But if there are more than 17 items on your diagram that you need to add to the report, you will need to use the Report Generation VIs to write your own VI to do this.  It may be as simple as having several Append Report Text VIs in a row, or Append Table to Report VIs, or whatever it is that you're trying to add to the report.

Good luck,

-D

0 Kudos
Message 2 of 20
(5,415 Views)
If you tried to open the hood and poking around inside with no luck, could you post that?  Maybe we can find something that you didn't catch.

In other words, post your VI and we will take a look.

Hope I can help,
Bob Young
0 Kudos
Message 3 of 20
(5,408 Views)

Bob,

Here is the vi.  Thanks for the help

Eric

0 Kudos
Message 4 of 20
(5,404 Views)
All

I am facing the same dilemma. I have about 50 inputs and I definitely want to create a template and generate a report. Template generation is so nice.
I have an idea but am not sure if it's gonna work. I was thinking about splitting the 50 inputs into 3 sets of 17, 17, and 16 inputs respectively and use express VI for each of them and create page1, page2, and page 3. Using activex, we can merge these three pages to a single document. Sounds ok or clumsy ?

Kudos are the best way to say thanks 🙂
0 Kudos
Message 5 of 20
(5,366 Views)

Hi!

You certainly could do this. The direct ActiveX calls may or may not be that difficult, but if you go down that road, it seems like it would just be easier to use the lower-level Report Generation VIs. They can access template bookmarks as well, and there shouldn't be any limit in number.

Jarrod S.
National Instruments
0 Kudos
Message 6 of 20
(5,341 Views)

Hello,

I actually was able to figure out how to create unlimited inputs so you can generate a report with as many fields as you want.  Once you open the front panel of the vi you can follow what the express vi did and add inputs in single, array or cluster format.  Then break them out and input them into the array of clusters that go to the subMS Office Report Block.vi "template data".  Once this is done then you will have to locate the Block State Information array constant, this is an array constant with a cluster inside and for every bookmark that you have you will need and entry into this constant where the field "Bookmark" matches the name in your "template data" array and the "Value Source" pulldown should be set to Input.  Since these are arrays behind the scenes you should be able to do a report with unlimited bookmarks. 

I hope this is clear, if not let me know and I will generate a jpeg showing what I am talking about.

Eric

0 Kudos
Message 7 of 20
(5,337 Views)
Cool ! Please do post a jpg.
Wht I was planning was :

1. Create a template in a document with as many bookmarks as I want
2. Use activex to read these book marks.
3. Use the insert object into VI from report generation, and insert an item into each book mark using a for loop.

However, if you got it figure I would go with your idea. Please upload your jpg...Thx

Kudos are the best way to say thanks 🙂
0 Kudos
Message 8 of 20
(5,332 Views)

Remind me again why you guys can't just use the standard Report Generation VIs for this?  Given that all the "Add [blah] to Report" VIs have a 'Bookmark' input specifically for Word reports, I don't quite understand why all this monkeying around with the Express VI is necessary.

-D

Message 9 of 20
(5,328 Views)
I have attached the vi itself.  (The back panel is too large for screen shots to make sense.)  I have added my comments highlighted in yellow.  As you can see I have 27 bookmarks being used but you can definately make more than that.  Hope this helps. 
 
As for why I used the express vi instead of writing it myself using report generation vi's?

Well I started with the express vi, and since it did all the work and all I needed to do was figure out how to add the inputs, it seemed easier than writing it myself and now that I know how to do it, I think it is faster this way.
Message 10 of 20
(5,323 Views)