Report Generation Toolkit producing error -2147417842, "The application called an interface that was marshalled for a different thread."

Hi everybody,
I've got an application that logs data to an Excel spreadsheet using the Report Generation Toolkit.  My VI's have worked fine in the past using Excel XP, but since I've upgraded to Excel 2007, I am getting COM errors like this one:
"Error -2147417842 occurred at The application called an interface that was marshalled for a different thread. in Excel_Insert_Text.vi"  That is the exact wording, even with the weird punctuation and capitalization.
The first occurrence of the error is not determinate.  Sometimes, up to 10 logging sessions, involving a new .xls file, can occur before this error pops up.  Once this error occurs, I must quit LabVIEW to resolve it.  If I try to do anything with Excel, I always get this error, although sometimes it comes out of different source VIs.  Excel_Open.vi is another.
These logging VIs have worked just fine until upgrading to Excel 2007.  I checked, and I was using a really old version of the Report Generation Toolkit, v1.0.1.  I read the documentation and had a big sigh of relief when I realized I needed to upgraded to v1.1.2 to get Excel 2007 support.  However, even after upgrading, I'm still getting the same errors.  I'm using LabVIEW 8.0.1, and I'm also building these VIs into an application.   The error occurs both in the LabVIEW IDE and in the built application.  Does anybody out there have any idea what I can do to fix this?  I googled a little, and discovered this is a COM error, but I can't find any references to the Report Generation Toolkit specifically.
Thanks,
Phil
Solved!
Go to Solution.

Hi Christian,
I do not see that exact option listed, do you mean "user interface"?  I recognize the "Run in UI Thread" option, it's on the Call Library Function Node.
I checked, and my top-level VI has "same as caller" set, and I believe all my VIs are set to "same as caller".  Are you suggesting I change my top-level VI preferred execution environment to "user interface", or just the logging sub-VIs that use the Report Generation Toolkit?
Thanks,
Phil
Attachments:
VI_properties.png ‏15 KB

Similar Messages

  • Need to know the highest version of labview that was released for HPUX

    Does anyone know the highest version of labview that
    was released for HPUX operating system ?

    Hello!
    The latest version of LabVIEW for HP-UX is LabVIEW version 6.0.2.
    Thanks for contacting us!
    Regards,
    Colin C.
    Applications Engineering
    Colin Christofferson
    Community Web Marketing
    Blog

  • Report generation toolkit VI error when running EXE

    A VI inside the Report Generation Toolkit (version 1.1.2), Excel Find Application Directory.vi, will not function correctly when running an EXE.  The "Current VI's path" block will return the path of the currently running EXE rather than the path of the Excel Find Application Directory VI.  (The same would be true for Word Find Application Directory.vi.)
    -Joel
    Solved!
    Go to Solution.

    Have you had a look at this knowledgebase article? The error is caused due to the exclusion of any dynamic VI.
    Ipshita C.
    National Instruments
    Applications Engineer

  • Report Generation Toolkit Excel errors and Libraries, Classes

    Hello All,
    I'm using the Report Generation toolkit Excel functions to handle some data and create graphs.  I'm running into problems with the Add Worksheet.vi.  At the very start of the vi, it closes the reference to Shapes.  Occasionally, the Close Ref will throw an error.  I haven't pinned down the exact cause yet (probably an invalid reference).  The error itself wouldn't be a problem.  Under other circumstances I would choose to ignore it and continue on.  The problem is, this is stored in a Class Library controlled by NI.
    Solutions I've tried without success:
    1.) Make changes, and save the new vi with another name - can't do it because it's encapsulated and the Library is password protected.
    2.) Install toolkit in something other than the default folder, so I can make changes and put it under Source Control - installer doesn't allow a new path to be entered.
    3.) Change the vi where it is.  This works until I move the source to another computer or I update Labview.  At that point I lose all my changes.
    Maybe it's just my inexperience with Classes, but I just don't see an elegant solution to this.  Ultimately I'd like to copy the library off to somewhere else and put it under Source Control so I can make changes and additions to it (NI folks - providing a password to unlock the lib would be helpful...).  Does anyone have suggestions on how I can accomplish this?
    Thanks in Advance,
    Doug

    Hi Ben,
    Sorry about the first post.  After re-reading it, it sounds more like a frustrated rant than a request for help.
    I've attached a simplified vi to try to illustrate the problem I'm having.  I'm running Excel 2007.  Please open the vi, then open Excel Add Worksheet.vi.  At the start of the vi, Close Ref for Excel.Shapes occasionally throws an error.  So far, I have not been able to consistently reproduce the error, so I can't really troubleshoot it.  As I recall, the error code is 1045.  The error is carried through the rest of the vi, causing invalid references to be written to Excel._Worksheet and Excel.Shapes, going out to NI_report.ctl.
    So, here are the issues I'm running into (other than the error itself):
    1.)Short of closing and reopening the file, there is no way to recover from the error.  After the error, there is an invalid reference in Excel._Worksheet.  There is no vi available to regenerate references in NI_report.ctl.  I could easily write a vi to start from Excel._Application and re-read them, but because NI_report.ctl is in a Class library (controlled and passworded by NI), I can't add the vi to the library.
    2.) I found that I could ignore the error by wiring around it.  If I disconnect Error Out from Excel.Shapes Close Ref and wire Error In from Excel.Sheets.Count to the Error In of the Close Ref, everything works fine.  Under other circumstances, I'd save this with a new vi name (because functionality changed) and continue on.  But, because the vi is part of a Class library (controlled and passworded by NI), I can't do this.  I can save the vi with the modifications (because Excel Add Worksheet.vi is not passworded), but if I pass the source off to someone else, they will have to make the same changes on their installation of the NI Report Generation Toolkit.
    Again, I can't reproduce the error with any regularity.  I've run the example vi I provided a few times and everything seems to work fine.  If I come up with something, I'll repost.  If you (or anyone) has an idea of what could be failing or if they've seen the problem, I'd appreciate a comment.
    Thanks again,
    Doug
    Attachments:
    Excel Fail.vi ‏15 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 - Error message rpcrt4.dll

    Hello
    My labview app. calls functions from the Report Generation Toolkit. I tested the runtime version, and this work fine under in Windows NT and Windows 2000, but does not work under Windows 98. I got and error message say "rpcrt4.dll Page not valid" that seem come from Windows and is related to a Remote Procedure Call. I already check the version of this dll 4.71.2900

    The rpcrt4.dll is part of the DCom98 package. I have seen other problems, unrelated to LabVIEW, with this .dll arise when other programs have installed different versions of some of the DCom DLLs. You may want to consider trying this program out on another Win98 machine, or you may want to search through the Microsoft Support page for errors with this dll, specifically with the error number in the message you receive. The ones that I have seen have suggested restoring the DCom dlls to the original ones from the Win98 disk. There is also an update to the DCom components for Windows 98 (version 1.3) on the Microsoft website.

  • How to set tabstops in MS Word using the LabVIEW Report Generation Toolkit

    Using the Report Generation Toolkit of LabVIEW, I need to set multiple tabstops that very in distance in MS Word.  I also have different sets of tabstops that I use and re-use at different times in the same report.  Is there a way to set the tabstops under program control?  I searched through the various VIs and found that there is a property ("Tabstops", "Word.Tabstops") in the _ParagraphFormat property node that refers to tabstops.  I found it in the Word Format Paragraph (adv) VI.  Unfortunately, I could not determine how to use it.  Any suggestions?  Is this an operational element?

    Bluebell,
    Sounds like you've already done some fantastic work to expose the various properties and methods of MS Word. It took me about 20 min before I could find the specific property that you were talking about! I found it under Word.Document>>Paragraphs>>Tabstops>>Add. There is a position, alignment and leader parameter that you can set from this property node. I've found that the best way to discover what these parameters do is to simply experiment. You could also try using the macro recorder in Word, perform the specific task, and then look at the code generated. I'm guessing that position sets the position of the tabstop itself. It sounds like your application is really specific. For such a specific task, I think I'd write a macro and call that macro from LabVIEW.
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • Problems creating a web service that uses the report generation toolkit

    Hi,
           Im trying to develop a web service using labview 2013.
    I create a html form that is correctly communicating with my labview method and part of the web service functionality is to create a report from the data obtained in the html form published.
    I realized that using the report generation toolkit inside of the web service method the server cannot generate a report. ( If I run the same Vi before publishing the web service it works on the server but it doesnt work after I deploy it)
    I thought that maybe Im unable to use the report generation toolkit VIs inside of the web service because Im not incluiding the (dynamic VIs labview uses when they run), I tried to add the excel dynamic library to the proyect but with no success.
    I also tried to use VI SERVER to call a VI that generates the report using the report generation toolkit  in the method that runs when the web service is call but  it doesnt work either.
    How can I deploy a web service able to use  the report generation toolkit ?, how can I deploy a web service able to use VI server ?
    Any help is really appreciated.
    Erwin Franz 
    Erlab

    The issue you are running into is actually a limitation intended by Microsoft.  They don't want windows services to be able to call into the ActiveX interface for Microsoft Office for security reasons.  If you are deploying your web service to the NI Application Web Server on Windows you will run into this problem since the web server is a Windows Service.
    While I haven't tested this, you may be able to work around this by packaging your Web service with a LabVIEW EXE rather than deploying to the NI Application Web server. 
    Mark
    LabVIEW R&D

  • Ridiculous number of directories when build includes Report Generation Toolkit

    I was getting error 7 with the report generation toolkit, so I followed the steps here and it works. Only problem is, it makes a different support directory for each individual file in the NIReport.llb directory.
    The calendar and data directories are my own. The rest are the RGT.
    Help? haha.
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    buildsetup.PNG ‏49 KB

    I set NIReport.llb to always included like it said, but it wasn't showing up after I did a build. So...I left it included always, I created my own destination with the same name (NIReport.llb) on the Destinations page of the app builder, went to the Source File Settings page of the app builder, selected NIReport.llb and set the location to be my NIReport.llb folder I created. I did a build and this solved the problem and all the NIReport.llb files were placed in a NIReport.llb directory. Someone pleaseeee tell me if there is a better way, but this will work for now.
    CLA, LabVIEW Versions 2010-2013

  • Report Generation Toolkit: Page Numbering

    When creating a Word Report using the Report Generation Toolkit, I am using the Word Set Page Numbering.vi to display the page numbers in the footer of each page of the report. This works fine when the include page x of n switch is turned OFF. However, when the switch is turned ON the numbers only show up in the left footer regardless of the position setting.
    Is this a known bug?
    If not where do I report it?
    I guess I just did...

    Hi Drugar,
    I have filed a CAR (43K9NBF2) regarding this issue.  I will look into fixing it for the next version of the Report Generation Toolkit.  If you want to workaround the problem for now, go into vi.lib\addons\_office\word.llb\Word_auto_text_entry (for page number).vi.  You can get a reference to the "Selection" property of the Application class.  Then under Selection, get a reference to "ParagraphFormat".  Then, you can set the "Alignment" property of the ParagraphFormat class.
    Thanks for reporting this issue, and let me know if you have any other questions.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Labview using Report generation toolkit in 2011 run time engine

    is that possiblity to run the  word in labview using Report generation toolkit in 2011 run time engine

    It is possible to use the Report generaion toolkit with the run time engine.  But you will have to include a lot of VIs from User lib since the report generation toolkit uses a lot of dynamically called VIs and classses.
    Certified LabVIEW Architect
    Certified Professional Instructor

  • Report Generation Toolkit using Chinese Characters

    I am trying to use the Report Generation Toolkit for Microsoft Office under LabVIEW 8.0.  I would like to use Chinese characters for the headings of the columns using a 2D array of the headings and the Excel Easy Table.  When I generate the report, the text of the headings appears to be jumbled and not encoding correctly.
    For example:
    仪器编号 becomes êNhV÷S
    采前初重(g) becomes Ç‘MRRÍ‘ÿg
    Any insights here? Thanks

    Hi,
    what you describe reminded me of a bug fix in the Report Generation Toolkit 2012 :
    339092
    Using the "Append Table to Report" VI to add strings of Cyrillic font to a table in an MS Word report results in gibberish being added to the report.
    http://digital.ni.com/public.nsf/allkb/09D6DE5170B3C0BD86257A2B004CFD20
    I know that Cyrillic and Chinese characters are different but they are often confronted to the same problems...
    Aurelie

  • Report generation toolkit upgrade issues

    I have created multiple vi's in that utilize the previous report generation toolkits specifically using the Generate Report Get Data to Modify.vi and the Generate Report Set Modified Data.vi.  Obviously the report reference has now changed in 8.6's version of the report generation toolkit and these vi's do not exist in the 8.6 library anymore.  What vi's do I need to replace these functions with to make this code work.  Can anyone tell me what the work around is to solving this problem.  This is a picture of the code.
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor
    Attachments:
    code.JPG ‏92 KB

    Hi BJD1613,
    The Report Generation VIs on the LabVIEW Palettes mutate properly. However, you may run into upgrade issues if VIs distributed with LabVIEW, but not available in the Palettes are used in the code. Hence, I would caution against using them for the same reason.
    In this case, the specific references do exist in the report generation classes; however, since they are private, they cannot be accessed by VIs outside the respective classes. A temporary workaround for now is mentioned in the following KB 4OOCSJ4M Getting References in Report Generation Toolkit 1.1.3 with LabVIEW 8.6.  
    This was reported to R&D (CAR# 123064) for further investigation

  • I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Error 10 when building an application in LV8 and Report generation toolkit 1.1.1

    I am trying to build an application using LV8.0.1 and Report generation toolkit 1.1.1 and i get this error.
    Error 10 occurred at ABAPI Dist Copy Non-VI Files.vi -> ABAPI Dist Build LLB Image.vi -> ABAPI Copy Files and Apply Settings.vi -> EBEP_Invoke_Build_Engine.vi -> EBUIP_Build_Invoke.vi -> EBUIP_Build_Invoke.vi.ProxyCaller
    Any ideas?
    Scientia est potentia!

    Did you attempt to add the _wordsub.llb and _excelsub.llb files to the application as support files?  I believe in LabVIEW 8.0 instead of adding the entire LLBs you should just add the _Word Dynamic VIs.vi and _Excel Dynamic VIs.vi as dynamic VIs.  I think I've seen a similar post on the discussion forums in the past that recommended this.
    If this suggestion doesn't help, please reply, and attach a simple VI and .lvproj file demonstrating the problem so I can investigate further.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • Can I use an Epson V300 scanner to get photos into Premiere Pro?

    I've got a ton of old print photos that I want to use on a video project for  CS5.5. Rather than matte them and then use my Canon camcorder, can I just buy a basic scanner like Epson 300 and convert them to digital? Will Premiere accept the scanned p

  • Synching calendars between iPhone 3GS and MacBook Pro iCal

    Since this morning, without having made any change to any setting whatsoever, entries made in the iPhone calendar seem to be duplicated in the iCal as many times as the two sync with each other. I've got the same entries duplicated 4 or 5 times. How

  • I cannot view some photos in iPhoto' 11

    I installed 10.7 successfully but some photos in my iPhoto library do not show.  Some events show blank and their contents show blank with a triangle containing "!".  I know the photos are there as they show up momentarily as I scroll the screen.  In

  • Impdp command returning errors in oracle xe

    Hi All I am using a CentOS server with Oracle express edition installed on it . I tried to import a dump file with the impdp command and got following list of errors . ORA-39002: ORA-31694: ORA-02354: ORA-39776: ORA-12952: What could be the possible

  • Java Stored Procedure / connection JDBC / Server Side / Client Side

    Hi, I would like to know if we can know at the runtime with a JDBC api if the stored procedure is running in client side or in server side ? THANKS