Jump to content

Can't get Word.Tables in Report Generation Toolkit in LV 8.6


Recommended Posts

I got a nasty surprise when I tried to open a VI that uses the Report Generation Toolkit to access a table in Word. The Generate Report Get Data to Modify and Generate Report Set Modified Data aren't part of the toolkit anymore. The NI site has some info and I've tried to follow their examples, but I'm just not getting it. Supposedly now I have to use LVclass stuff to access what I need. I haven't tried to use LVclasses yet, and don't have a lot of time to learn a whole new set of tools. Could someone show me how to modify the attached really simple VI that counts the number of tables in a Word doc? Mostly I just need to know how to get access to Word.Tables.

Download File:post-2786-1221055973.vi

Thanks,

George

Link to comment

QUOTE (mross @ Sep 10 2008, 11:28 AM)

George,

With the introduction (forced injection?) of Word 2007, it is again very necessary to mention what versions of Word are in play. Word 2007 doesn't play well even with previous versions of Word. Sorry, but I have no actual wisdom re your troubles.

Mike

I'm using Word 2003. I'm pretty sure the Word version isn't an immediate problem here. It's more that they introduced objects into play here where there weren't any before. I figured I had no real use for OOP since I don't do multiperson projects and most of my apps aren't all that big. I don't think it's fair that they expect me to program in OOP just to fix a VI that they broke.

George

Link to comment

QUOTE (george seifert @ Sep 10 2008, 11:37 AM)

Hi George,

Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find:

http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5

which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes.

And hopefully I can clear up a couple things in this thread:

1. When we (NI) make changes to a toolkit, we guarantee the palette VIs. SubVIs not on the palette are subject to be changed or removed. That said, we don't want or try to break your application. We will likely add some utility VIs to the palette in the future to allow access to the Word and Excel references without having to edit the existing toolkit VIs.

2. It is true that you cannot add VIs to the to the NI_Word,lvclass or the NI_Excel.lvclass. It is false that the class implementation blocks access to the Word and Excel ActiveX – you can get to the references as described in the KB link above.

3. While you cannot add VIs to the classes, you can edit the VIs in the classes. However, please remember that when you do this, you need to be aware that installing the next version will replace your edited VIs.

Hope this helps,

Doug Norman

Link to comment

QUOTE (Doug Norman @ Sep 10 2008, 03:28 PM)

Hi George,

Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find:

http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5

which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes.

And hopefully I can clear up a couple things in this thread:

1. When we (NI) make changes to a toolkit, we guarantee the palette VIs. SubVIs not on the palette are subject to be changed or removed. That said, we don't want or try to break your application. We will likely add some utility VIs to the palette in the future to allow access to the Word and Excel references without having to edit the existing toolkit VIs.

2. It is true that you cannot add VIs to the to the NI_Word,lvclass or the NI_Excel.lvclass. It is false that the class implementation blocks access to the Word and Excel ActiveX – you can get to the references as described in the KB link above.

3. While you cannot add VIs to the classes, you can edit the VIs in the classes. However, please remember that when you do this, you need to be aware that installing the next version will replace your edited VIs.

Hope this helps,

Doug Norman

Thank you Doug for the link, but I can't download the workaround.zip the link to the file is not working.

Dany

Link to comment

QUOTE (Doug Norman @ Sep 10 2008, 02:28 PM)

Hi George,

Let me first say there is an easy work around for this. If you search ni.com for "report generation kb" you should find:

http://digital.ni.com/public.nsf/allkb/8D2...62574B000534AF5

which explains what to do. The basic idea is to edit one of the existing VIs (Get Report Type) to output the references you need. You do not need to know anything about LVOOP or classes.

Doug Norman

I downloaded the example, but it's broken. I can't figure out how to get it to work. I've been messing with it for quite a while now and am feeling really stupid. I just can't understand how to get the correct Get Report Type VI in there. When I double click on the Get Report Type VI in the example VI it brings up a dialog asking which implementation to load. I figured that the NI_Word one makes the most sense. That VI comes up broken with this explanation

"This VI doesn't match other VIs in the method, Connector Pane Terminal(s) are different. All VIs that implement a method of a LabVIEW class must match Connector Panes. To correct this, compare Connector Pane of both this VI and the VI of an ancestor class that implements this method."

What the heck does that mean? Maybe I'm making this too hard. Sure seems like I need a knowledge of LVOOP to get this going. Any help to get me further along would be appreciated.

George

Link to comment

QUOTE (daal @ Sep 15 2008, 12:22 PM)

Hi George,

The exemple VI will work if you copy the "NIReport.llb" folder in <labview 8.6>\vi.lib\Utility, this will replace all implementation of the "Get Report Type.vi" to be able to access the Word._Document activeX.

Dany

Thanks for the help. I downloaded your example and the Word-GetTableCount VI is broken. Where am I supposed to copy the "NIReport.llb" folder to?

George

Link to comment

QUOTE (george seifert @ Sep 15 2008, 01:55 PM)

Where am I supposed to copy the "NIReport.llb" folder to?

In the workaround.zip you have an example and a NIReport.llb folder, copy this NIReport.llb folder to <labview 8.6>\vi.lib\Utility. You have already NIReport.llb folder in the <labview 8.6>\vi.lib\Utility that contain the complet tookit. The workaround VI will replace all instance of "Get Report Type.vi" and with this version you will be able to access Word._document activeX

Dany

Link to comment

QUOTE (daal @ Sep 15 2008, 02:18 PM)

Don't replace the entire NIReport.llb you just need to overwrite all instance of Get Report Type.vi (In HTLM, Word, Excel, Standard Report subfolder) Those file have the same name but are specific to each Report Type.

I finally got it going. All I needed was some really simple instructions. The KB on this is really confusing. If it just said copy these files to these locations I would have been done two days ago. Anyway, thanks for the help.

George

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.