Report Generation MS Word Table Bug

Hi everybody,
I am using Word 2010 and LV2010 and I am unable create a proper table with Word using the Report Generation Toolkit. Excel and HTML work fine, but Word fails. Not even the Examples work as they are supposed to.
When using the attached VI (see screenshot below)
the result appears as follows:
Temperature
Temperature
Temperature
Temperature
Temperature
Data 1
Data 1
Data 1
Data 1
Data 1
Data 2
Data 2
Data 2
Data 2
Data 2
Does anyone have an idea?
Thanks in advance.
ben
Solved!
Go to Solution.
Attachments:
test_table.vi ‏10 KB

OK, if NI won't provide a workaround, I'll create my own:
The problem stems from the fact that the NI Report Toolkit populate a Word table by first creating an empty table of the correct size, then placing the table contents into the copy buffer, then selects the whole table and uses Paste to push the data into the table. The problem is actually in Word, because in Word 2010 it interprets the contents of the copy buffer differently.
The solution is to alter the data that gets pushed into the copy buffer by the NI Report Toolkit. To implement my fix, you will need to alter one VI of the NI Report Toolkit (so you might want to make a backup in case this stops it from working in other previous release of Word).
Open [LabVIEW installation folder]\vi.lib\addons\_office\_wordsub.llb\Word_In​sert_Table.vi
There is a nested for loop that interprets the provided string array data and reformats it into a long ASCII string for the copy buffer. It should look like this:
Change the nested loop to look like this:
The changes I've made are twofold:
1. Within the inner loop, replace the "\n" char with a Tab character
2. Just after the inner loop, add a new "concatenate strings" function that adds "\n".
This alters the string that the toolkit places into the copy buffer. You should find that report tables now populate correctly in Word 2010!
This is untested on previous releases of Word, and could possible introduce problems there, so if anyone could test this for me it would be most appreciated
Best of luck!
Thoric (CLA, CLED, CTD and LabVIEW Champion)

Similar Messages

  • 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

  • Report Generation MS-Word always give error

    Hi
    I am using LV 2012 and MS Office 2010.
    I am using report generation toolkit to have a customised output report.
    When I specify output format as excel, I am able to get the desired result but when I specify output format as word, it always throws an error. I checked running the NI examples meant to give output in word but they all fail while the excel reports are perfect.
    Please find attached an error code for one of the example Sample Report(word).vi
    Please suggest the solution.
    Regards,
    Manbir
    Attachments:
    error_doc.JPG ‏20 KB

    We need to see the code in order to say "Here is the error" or "Try doing it this way".  It also gives us something to try, ourselves.  Do you know how to make "snippets", which are .PNG "pictures" of your code that you can simply put into the message using Insert Image?  We can then drag this image into a LabVIEW Block Diagram, and voilà, working code!
    BS

  • Report Generation Toolkit (Word) : How to use correctly bookmark and cross-reference without "Error! Reference source not found"

    Hi,
    I try to generate a report using a template. In my template I use some cross-reference to refer to one bookmark. For exemple in the first page I created a bookmark for my name and in the header I created a cross-reference refer to my name. The problems is when I run my VI the bookmark actualise perfectly but the cross-reference refer to the bookmark can't actualise with the same value and generates an error : "Error! Reference source not found".
    Can somebody help me please!
    Nki
    Solved!
    Go to Solution.
    Attachments:
    01.jpg ‏72 KB

    Hi,
    When i create the word template, the bookmaks and the cross-reference referred to the bookmark update correctely. The problem is when I try to change the bookmark using "report generation from template vi" the bookmark change but not the cross-reference and the error generated is "Error! Reference source not found". 
    I make coople reasherch and i think they have no solution for this because : "if the text in a heading referred to in a cross-reference is revised, the cross-reference to the heading may no longer work" (http://office.microsoft.com/en-us/word-help/troubleshoot-cross-references-HP005189368.aspx).
    To "resolved" this problem I create an other bookmark in the template who have the same value white the principle bookmark.   
    I use Labview 2011 and Micosoft office 2010.

  • Can I align the orientatio​n of axis labels in a graph generated with the report generation toolkit (Word)?

    I was wondering how to align the axis labels, i.e. 90 degree or such when creating a graph with the report generation toolkit in word.
    I can do it after the document is created through Format axis title -> alignment but is there a way out of LabVIEW?
    I'd especially like to rotate the y-axis label by 90 degrees.
    Thanks a lot,
    Juergen

    I think he means he can modify it by hand after the report has been generated... But what I want to do is generate the word graph out of labview already with the rotated axis label...
    After I posted this I found out that we can do this with a macro and use it from labview, but unfortunately I don't know VB, or VBA...
    Like this:

  • Strange behavior with Report Generation Toolkit. Table does not match array.

    We are using a Word 2003 document (.doc) as a template for a report summary.  This works fine on the development PC.  It fills out the appropriate fields in the document and fills out the table correctly, as shown in the image below.
    However, the same cannot be said on another station.  Although the 2D array is identical, and so is the software to investigate the issue, the table does not get populated correctly.  I have investigated using Word 2010 (.docx) as a template, with the same results.
    I have not been able to figure out what is different between the 2 stations and why it does not work on the 2nd station.  I looked for similar issues on the NI website and the only relevant item from Knowledgebase was concerning new lines within the cell, which is not my case.
    This is what I get on the 2nd machine:
    The array that is sent to the table contains the appropriate data:
    Solved!
    Go to Solution.
    Attachments:
    GoodTableWord.png ‏25 KB
    BadTableWord.png ‏18 KB
    BadTableArray.png ‏22 KB

    And, of course the code snippet that was used:
    It is a sample code that was used to investigate the issue.  It works like the original code on the original development PC, but it does not work on the other station...
    Has anyone seen this bizzare behavior?  If so, how does someone solve it?
    Thanks!
    Attachments:
    sampleCode.png ‏60 KB

  • Report generation with two tables having no join

    Hi, 
           I would like to know if i can generate a report to view data from purchase and sales tables at one time even if they are not directly linked.
    Regards,
    Bhavna

    hi jain,
    You can use Union All to combine sql queries of sales and
    purchase tables.
    Jeyakanthan.

  • Report Generation (MS Word)

    Is there a way to make the target MSWord document have landscape
    orientation?
    Thanks,
    Peter

    Use "Set Report Orientation.vi" in the Report Layout pallete.
    - Dan

  • 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: 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

  • 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

  • MS WORD TABLE commands such as "AutoFit to contents" can be achieved in LabVIEW report generation?

    LV 7.1 and Report Generation Toolkit 1.1.
    I generate a report by the tookit.But tables are in disorder because of the different contents in cells.
    Is there a way(or any function) in LabVIEW to made it like "AutoFit to contents" or "AutoFit to window" in WORD.
    Thanks
    =======================
    Windows XP SP2+LabVIEW 7.1
    Attachments:
    Report.vi ‏98 KB

    Where is this VI that you say to take the "Data" output from located?  I can not find it on the Palette.
    I need to do the same thing to a word report I am creating, autofit the tables to contents (except certain ones) and need to know how to access that property.
    EDIT - Nevermind - I found it.
    http://digital.ni.com/public.nsf/allkb/dc08b6a56dbe00a586256f1d006826dc
    Thanks,
    Ryan
    Message Edited by RVallieu on 04-26-2006 04:14 PM
    Ryan Vallieu
    Automation System Architect

  • 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: linebreak text in Word table row

    Hello everybody.
    Im trying to add some pretty tables to my Word report created with the Report Generation Toolkit.
    I build my 2d string array with the table data and that works fine. But if I add a text to the array cell that has a linebreak constant it breaks the table. I.e my strings is not in the right place and some are missing in the table if linebreaks exists in the strings in the 2d string array that I feed to the 'Word Easy Table' VI. Se my lw 7.1 example below.
    Any one have an ide how to solve this?
    Attachments:
    WordTable-LinebreakProblem.vi ‏82 KB

    Paul,
    You last response got me think about the complex nested grouping of my for loops that are surrounding and embedded in my table(s). I analyzed my groupings and found that two of my levels had similiar values. When I moved those groupings outside my table, the 3 TOC entries FINALLY appeared !!! Newbie error!!! Anyway, the only problem left to resolve is the page number is not generating with the TOC entries (Getting Bookmark Not Defined Problem). I am wondering if this is a context problem ...or still part of a looping problem. I also can't seem to get the table headers to replicate on page breaks in RTF mode. They do work in PDF generation mode. It is sort of difficult to pass info because I nature of the info I am working with. Thanks for your time and patience. I have learned alot just trying to get this complex template to work.
    Thanks,
    Tom

  • Using Word Easy Table Under Report Generation takes long time to add data points to table and generate report

    Hi All,
    We used report generation tool kit to generate the report on word and with other API 's under it,we get good reports .
    But when the data points are more (> 100 on all channels) it take a long time  to write all data and create a table in the word and generate report.
    Any sugegstions how to  make this happen in some seconds .
    Please assist.

    Well, I just tried my suggestion.  I simulated a 24-channel data producer (I actually generated 25 numbers -- the first number was the row number, followed by 24 random numbers) and generated 100 of these for a total of 2500 double-precision values.  I then saved this table to Excel and closed the file.  I then opened Word (all using RGT), wrote a single text line "Text with Excel", inserted the previously-created "Excel Object", and saved and closed Word.
    First, it worked (sort of).  The Table in Word started on a new page, and was in a very tiny font (possibly trying to fit 25 columns on a page?  I didn't inspect it very carefully).  This is probably "too much data" to really try to write the whole table, unless you format it for, say, 3 significant figures.
    Now, timing.  I ran this four times, two duplicate sets, one with Excel and Word in "normal" mode, one in "minimized".  To my surprise, this didn't make a lot of difference (minimized was less than 10% faster).  Here are the approximate times:
         Generate the data -- about 1 millisecond.
         Write the Excel Report -- about 1.5 seconds
         Write the Word Report -- about 10.5 seconds
    Seems to me this is way faster than trying to do this directly in Word.
    Bob Schor

Maybe you are looking for

  • Can not open links in mail on ipad mini

    I can not open a link to safari from the mail app on an iPad mini.  is their setting for this function somewhere?

  • My project gets an error message and crashes everytime I go to render or preview on AE

    I have recently starting using AE on my computer, every now and then its struggled to work but I haven't had any major issues until now. When I try to render or preview my project I've had an error message pop up saying: "After Effects error: crash o

  • Sending mail to a particular positon in org structure via workflow

    hi all i have a problem regarding sending mail to particular position in org structure on runtime execution  via workflow so that i neednt hard court the particular position to achieve this i am using expressions,first i have created a new container

  • Video stutter with iTunes movies - how to fix?

    I just downloaded some movies from iTunes for the first time in both HD and standard format but none of them will play stutter free. I have these horizontal lines going through the image like the frame is slowly building itself up. Sometimes the whol

  • Super drive on my Dual 800 g4 Quicksilver

    I trying to boot from the recovery disc that came with my Mac, However when I hold down the C key to boot the drive will spin up then stops. never getting to the disc so I can reinstall. So I figured the drive was bad( it is over 8 yr's old ). Instal