Report Generation Toolkit: Table of Contents in MS Word

Hello forum users,
I would like to add a table of contents to a MS Word document, using the Report Generation Toolkit.
I couldn't find a VI in the toolkit that does that, so I tried to modify the VI "Word Insert Field.vi". Doing so, I could access a property node of the class "Word._Document"  and an invoke node of the class "Word.TablesOfContents" with the method "Add".
As this modified VI does not belong to the private LabVIEW class "NI_Word.lvclass", it is not possible to unbundle the (type cast) "report in" wire to get the "Word._Document" class reference. I can't add the modified VI to the NI_Word class either, because it is password protected.
There are so many methods and properties that are not used in the official Report Generation Toolkit, like this one. How can I access them?
Or maybe there is another way to add a table of contents to a MS Word document (programmatically). Maybe I have to use a template. I rather wouldn't, though.
Operating System: Windows 7 64bit
LabVIEW: 2009 [9.0 (32bit)]
Report Generation Toolkit: 2009
MS Office: 2003 SP1
Thank you for reading an answering.
Solved!
Go to Solution.
Attachments:
Word_Insert_TOC.png ‏68 KB

Hello again,
in the "Word Specific" > "Word Advanced" Palette of the Report Generation Toolkit, there is a VI called "Word Get ActiveX References" which essentially unbundles the private "report" data stream / wire. Thus, I can use the property and invoke nodes that make use of the "Add TablesOfContents" method.
I hope, that helps other users as I didn't find too many topics on Report Generation. Maybe it's just too easy...
Attachments:
Word_Insert_TOC_fix.png ‏60 KB

Similar Messages

  • Report Generation Toolkit Table Row Height-MS Word

    I am having trouble setting the table row height in the report generation toolkit. I can set the column width fine, but the row height seems to remain the same no matter what I set it to. I have attached the VI that generates and formats the table, and the printout it is resulting in. I have also attached the template file I am using.
    Any tips to get this to work right? I am trying to make the cells exactly the same height as the text inside. 
    Solved!
    Go to Solution.
    Attachments:
    AddMarkersToReport.vi ‏20 KB
    badFormatting.pdf ‏179 KB
    splitter.docx ‏13 KB

    Hi,
    So I tried .2  and it didn't work.  So I went to Word to manually change it, and it did not work either.  There is a selection box in word, for the table properties, that seems to default to the value "at least".  When I changed this manually to "exactly" in word, no problem with the .2 manually in Word.
    Hopefully this can be set within the template, for all new inserted tables.  I'm not sure the report generator VI's expose this property.  Well, this is a start for the issue.
    Edit ****
    You can go into the add table VI and expose the property.  See pic.   However, you have to decide if you want to "upgrade" this VI permanently to expose this property or make a copy with the property exposed.   I haven't messed with the new class reports too much, so not sure of the ins and outs with this.
    I think this is the issue with the row size becoming smaller.
    Mark Ramsdale

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • Report Generation Toolkit hyperlink in a table

    Having just purchased Report Generation Toolkit 1.1.2 for Microsoft Office for my LabVIEW 7.1, I'd now like to create an HTML report containing a large table.  I'd like to fill the cells of the table with Hypertext links to various documents.  I can't see any vi's in the toolkit that do this  Can someone please suggest where I should be looking, or the best approach to this problem?
    Solved!
    Go to Solution.

    Hi JohnBoy,
    Please see the following KnowledgeBase Article: Creating Hyperlinks to Files on the Local Hard Drive.
    Regards,
    Claire Reid
    National Instruments

  • Running macro on Table using Report Generation Toolkit and Office 2003 Incompatible!!!!!!!

    Hi,
    I am using some functions under the Report Generation toolkit (LabView 7.1). We recently updated our test PCs from Office 2000 to 2003. The "WORD IMPORT MODULE.VI" returns error code -41113 when used with Word 2003. No problem on Word 2000.
    In fact even the example VI available under Find Examples - Run Macro on Word Table fails and returns error code -41113 when "WORD IMPORT MODULE.VI" is called on Word 2003. Word 2000 is OK.
    Any one faced this problem???? Any solution to this problem??
    I would greatly appreciate your feedback / suggestions.
    Thanks,
    Mim

    darren,
    thanks for your reply.
    After checking the the property "Trust access to Visual Basic Project" , I get the following error message:
    Exception occured in Microsoft Word, Unable to run the specified macro. Help Path is C:\Program Files\Microsoft Office\OFFICE11\1033\wdmain11.chm and context 37401 in Word Run Macro.vi->SetFirstRowAsTableHeaderforWord(Macro).vi->Generate Report.vi
    I can run the macro directly from Word.. no problem running macros in Excel dirently either. I get error message only when running macro from LabView. So, I doubt if it is an IT issue.
    You don't have a problem with Word 2003 and Word Import Module.vi???
    I am attaching my Vi-Report Generation.vi and the subvi. I would so much appreciate if you run ReportGenerate.vi on your PC and let me know if there is a problem.
    Many Thanks for your help.
    Mim
    Attachments:
    ReportGeneration.zip ‏75 KB

  • Labview 2013 report generation toolkit word 2010 insert table problem

    Hi,
    I am currently evaluating LV2013 with respect to the report generation toolkit for use with word 2010. My Vi/program won't insert the correct table and gives me an error message. see below:-
    Exception occured in Microsoft Word: The requested member of the collection does not exist.Help Path is wdmain11.chm and context 25421 in NI_ReportGenerationToolkit.lvlib:Word_Insert_Table​.vi->NI_Word.lvclass:Append Text Table to Report.vi->Word Table save.vi
    I have since run the following word example.vi provided by NI within LV2013 office examples:- Growable table.vi. this gives me the same error!
    Exception occured in Microsoft Word: The requested member of the collection does not exist.Help Path is wdmain11.chm and context 25421 in NI_ReportGenerationToolkit.lvlib:Word_Insert_Table​.vi->NI_Word.lvclass:Append Text Table to Report.vi->Growable table.vi
    It would seem that regardless of my own Vi there is a fundamental problem in the office example vi.
    I have found examples of a similar problem in LV2011/2012 but the work around code doesn't seem to match the LV2013 vi's code for a direct replacement.
    Can anyone help/shed some light on this? 
    Thanks in advance,
    Dan.

    Because the upgrade of Word from 2007 to 2010 I needed to upgrade an existing application from LabVIEW 2009 to 2013. This didn't work because of the insert table error. I discovered that the problem is the vi called "Word_Insert_Table.vi" located in the ..Program Files (x86)\National Instruments\LabVIEW 2013\vi.lib\addons\_office\_wordsub.llb. There is a "Cut" command implemented, this command removes the created cell instead of clearing it. Therefore the table will be filled half and then returnes with an error. I have removed this command. I have posted the changed vi (LV 2013).
    Attachments:
    Word_Insert_Table.vi ‏30 KB

  • Inserting an image into a Word Table with the Report Generation Toolkit.

    I was wondering if it was possibe to use the Report Generation Toolkit to place an image into the cell of a table in a Word document?
    Solved!
    Go to Solution.

    Hi,
    Yes, you can do this by using the Word Edit Cell VI under Report Generation>>Word Specific>>Word Tables in your block diagram functions pallette.  After creating a table, you can edit specific cells and send the file path of the image saved on your computer to that specific cell.  I put together an example that I've attached here as well to help you out with this.
    Regards,
    Austin S.
    National Instruments
    Academic Field Engineer
    Attachments:
    RGTWordImageInTable.vi ‏14 KB

  • Report Generation Toolkit Error (undefined erro)

    Does anybody know what error -214 682 7864 (0x800A01A8) means when coming from the Report Generation Toolkit.
    I have an app which has been happily ticking over for several weeks, and then this error was generated when attempting to write a table to a spreadsheet. The error was generated all the way down in NIReportGenerationToolkit.lvlib:Excel_Get_range.vi (this is the ActiveX code).
    Any ideas? 
    nrp
    CLA

    nrp wrote:
    I have an app which has been happily ticking over for several weeks, and then this error was generated when attempting to write a table to a spreadsheet.
    Was it the first time you attempted to write the table to that spreadsheet?
    Maybe the error is due to the spreadsheet grown oversize than its limit so that it cant accomodate the table anymore.
    What is the version of MS Office you are using? I think Office 2003 can go only upto 1024 columns...
    - Partha
    LabVIEW - Wires that catch bugs!

  • Report Generation Toolkit V9.0.0 : Print Report.vi doesnt print

    Hi,
    i have migrated my Labview 8.5 Project with Report Generation Toolkit V1.1.2 to a Labview 2009 System with Report Generation Toolkit V9.0.0.
    In this Project I use the Report Generation Toolkit for printing out a Standard Report with e few Tables and Graphs.
    Now the VI Print Report.vi delivers the Error -41002 with the Text "Invalide Printer Name". I have, of course installed the propper Printer on the machine.
    I don´t connect a string to the "Printer name" input of the VI, because i want to use the default printer.
    In my oppinion, there´s  a bug in the Print Report.vi: if you don´t wire the "Printer name" input, the vi should use the default printer, but in this case the vi connects the empty input string to the input of the method node it calls.
    I fixed this bug, but the method node still returns the same error.
    any ideas?
    Thanks!
    Solved!
    Go to Solution.

    Thank you for the link!
    For some reasons i can´t find this specific article in the knowledge base (my browser is always rerouted to the german version of ni.com, because i am in Austria). I tried to search with the exact title of this article, and the error message string, but no results...
    I have also installed Labview 8.5 and the "old" Toolkits on my new computer in addition to Labview 2009 and the "new" Toolkits and tested my program in 8.5. Here i got an error mentioning the margins and i had to change the margin settings for printing out, then in worked.
    After reading the article, i have applied the same changes for the margins in the 2009-version of my program and it works too!
    Problem solved!
    Thank you very much!
    PS:
    I first wrote, that there´s maybe a bug in the new version of the Print Report.vi, but i´ve compared it with the old version and it seems to be no bug, sorry!
    After all I decided to stay with Labview 8.5 for now, because of another problem:
    it´s not possible to "save for previous version" from LV2009 to LV8.5 directly.
    Laview crashes, when a VI contains an event structure as i found out by searching through the "known issues", and i have a lot of VIs with event structures!
    I have to have the possibility to save my Labview projects for 8.0 and 8.5. The only way is to save for 8.6 and then save from 8.6 to 8.5.
    That´s nasty and time-consuming!
    Maybe a future update will solve this problem (without producing new ones)

  • Report Generation Toolkit Error

    I  have an application that generates multiple excel spreadsheets each containing a table and four graphs.  This has been working fine for three months but I am now getting error when generating the reports.  The source of the error is in the Excel_create_workbook as indicated on the attached picture.  I am passing in a template name for my excel reports.  The error code (-2147352571) states a type mismatch.  The file path to my template is a constant so I can't see how sometimes I get a type mismatch and other times I don't.
    Any help on this would be greatly appreciated.
    Thank you,
    AJL
    Attachments:
    create_Workbook error.JPG ‏269 KB

    Thanks for the reply, however, this VI is part of the Report Generation Toolkit so I don't want to have to modified NI's code if possible.  I did try your suggestion without saving the VI and I still got the same error. 
    Any other ideas? 
    BTW - I encountered this problem first in an executable but have since seen the error in the development code.
    Does anyone know if there is a limit to how many times you can create an excel document from LabVIEW?  I wouldn't think so but the error seems to happen if I try to create several (more then five usually) documents at a time. 
    Thanks in advance
    AJL

  • Report generation toolkit excel, decimal?

    Hello!
    I have problem with the report generation toolkit excel!
    I only gets 3 decimals in excel?
    Ex. In labview = 0.0458943 when i send it to excel = 0.046.
    I use Excel easy table.vi to transfer my array, should I use someting else?
    Ive already tryid to increase the decimal in excel but i doesent work.
    Labview 8.6
    Report generation toolkit ev 113 

    Johan1300,
    It sounds like you are writing a 2-D Array of doubles to excel.  The Excel Easy Table.vi converts numerics to strings before writing data to excel.  It is written to always use 3 decimal places.  You need to convert your 2-D array of doubles to strings before writing the info to excel.  Here are a couple of ways to make the conversion.  The top method is based on how the Excel Easy Table.vi makes the conversion.  Note that in both examples the format string constant sets the number of decimal places to 8.
    Message Edited by Wayne.C on 04-08-2009 09:12 AM
    Attachments:
    2D Doubles to 2D String.png ‏6 KB

  • Report generation toolkit does not work

    Hello,
    The report generation toolkit does not work.
    It seems to point to the 'Generate Report Data Members.ctl'.
    I suppose it has something to do with the wrong set of active X-controls ?
    I work with Win 2000 and Office XP
    How can i solve this problem ?
    Thanks in advance !
    Regards
    Christine

    Hello Julien,
    Sorry for the late answer
    I become a broken arrow, when openening the example Sample Report (Excel).vi
    Searching further for the cause of the error it brings me to the sub vi tables.
    Print screens in attachment
    Regards
    Christine
    Attachments:
    error Ni Reports.doc ‏67 KB

  • Report Generation Toolkit - Prints data from a previous report in Word

    I am running an executable from the "system exec.vi" created with Labview 6.1. I am using the Report Generation toolkit vi's to create a report in Word that prints simple Title with test header and then appends a Table with measurement data. The problem is the measurement data in the table is from a previously printed report. This problem only exists when I Run the Report.exe from the "System Exec.vi". If I manually start the Report.exe in Windows or open in the Windows Commandline the correct data measurement data is printed in the report table. Any suggestions are appreciated. Thank You

    Hi,
    So far I havent been able to reproduce this on my computer. Could you post your code so that I can try and reproduce this issue?
    Feroz P
    National Instruments

  • Error 7 with Report Generation Toolkit

    Hello Everyone,
    I'm trying to generate an Excel sheet report for some readings using "Report Generation toolkit" But when trying to generate the report, the report generation part of code is executed and gives Error(7) and there is no report is generated.
    The Code I use is atached in the following Link:
    https://www.dropbox.com/s/9n4brimucsd0xts/Report%2​0Generation.rar
    Can I get help please?
    Thanks in advance
    Solved!
    Go to Solution.

    I was able to download and open your compressed file.  I unpacked it into a folder.
    There are numerous peculiarities that lead me to ask "Are you trying to learn LabVIEW on your own, without a mentor and without training and guidance"?  Here are some of the things that I noticed:
    Although a Report Generation .lvproj, .aliases, and .lvlps file, the Project, when opened, was empty!  Since Projects were added to LabVIEW, almost all development should take place in a Project, but you do not appear to be doing so.
    You have an Event Loop (good) to handle pressing Start, Stop, and Report buttons.  But instead of using Boolean controls with a Latch property and using a "Value Changed" event, you use Switch Until Released (which, so far, I've never used) and a Mouse Down Event.  I suppose this could work, but I've never seen this pattern.
    You are writing an Excel Report, but are not using the Excel-specific VIs (such as Excel Easy Table).  Why (or Why Not)?  The basic idea of an Excel Report is that you create the 2D text data you want to write into Excel, then with a few simple VIs, you open Excel, write the Table, and save the Report.  In particular, you don't write out something that resembles the columns of the first few rows of a Spreadsheet (Date, Time, Test, etc.).
    Now to your specific question, Error 7.  Do you know what this error means?  If you click on Help, choose Explain Error, and put in 7, you will see this means "File Not Found".  Well, there is an obvious place where a File is used, right when your program starts.  I recommend that you put a Probe (do you know about Probes?) or an Indicator on the path going into the main For loop and see what File you are trying to open (hint -- there's an error in the way you build the path, but you should be able to figure out how to fix it).
    Good luck.  Hope these suggestions get you on a Better Path.

  • Report generation toolkit and column

    Hello, i asked this question before, but this time i just needed some input..
    I originally asked, if i am doing various experiment sets and say each sets takes in about 1000 data points, and i have to do 50 such experiments continously i wanted to know if there was a way of arranging the data so that for each experiment is written in a different column, so i have 50 different column. Instead of the current one column with 50000 data points.
    I was kindly suggested various alternatives such as using arrays...now my querry is regarding something that i heard which involves Report Generation toolset.
    If i was to get this toolset, with this make my life easier interms of sorting my data out into different columns? I ahve also been
    told it will do all sorts of graphs and do pretty much everying thing falling short of making a cup of tea
    Now has any one had any experience in this type of porblem? or do i have to stick with the array solution. Incidently the reason why i have a niggling problem with arrays is that my programme is stricly no limited to just 50000 data for some runs i can decide to take more data in one set then the orther so building an array becomes problematic.
    Please let me know what you all think of this kind Regards
    Mansoor

    Hello Mansoor
    If you want to write the data to an Excel spreadsheet there are several options available to you as well as the Report Generation Toolkit.
    I have posted some links to help and advice on performing this action using the toolkit, but also using the file I/O vi's and using active X.
    Have a look at these links and if you have any further questions please reply to this post.
    Report Generation Toolkit User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/463​34E8183C5360586256E3F00603DDB?OpenDocument&vid=niw​c&node=132100_US
    Report Generation Toolkit Tutorials
    http://zone.ni.com/devzone/devzone.nsf/webcategori​es/A50386FBB21ECC1A86256AB7006C2E6C
    File I/O information
    http://zone.ni.com/devzone/devzone.nsf/webcategori​es/BC4E8ABB211CFE7F
    86256A1F0062CEB2
    Writing data to an Excel file example in the LabVIEW example finder at the following location: - �Communicating with External Applications -> ActiveX -> Excel -> Write Table to XL.vi�
    Regards
    Hannah
    NI

Maybe you are looking for

  • Jar files are not exported while PAR Export

    Hi Experts, When  I am exporting as PAR file, in the par file  I am not getting the jar files, which I am adding as external jar files in the java build path - Libraries Please tell me the solution. urgent... Regards, Shyam

  • Renaming in LR needs Changes--or I need help!

    Is there any way to simply rename individual images in grid view without having to haul out the heavy artillary with F2? I am used to DAMs and other image apps where all one has to do to rename a single image is to click (or double click) on the name

  • Itunes cannot sync ipod to computer

    Itunes has suddenly started refusing to sync my ipod, claiming there is not enough room on my computer.  There is 210 GB free on the hard drive, and it's a 32 GB ipod.   I've tried emptying the trash and deleting files, but that doesn't help (not sur

  • Problem when open external link (Adobe LiveCycle ES2 workspace) with iView

    Dear all, I would like to know what EP doing when I use the iView to open a external application link. We setup the link to open in a new windows, but we find that the application behaviour is difference compare to input the link into the brower dire

  • Difference between the 2 FM's

    Hi experts can anyone please tell me the difference between the 2 function modules: REUSE_ALV_GRID_DISPLAY and REUSE_ALV_GRID_DISPLAY_LVC . I have seen in the coding for editable ALV that they have made use of the former FM rather than the regular RE