LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation Tool Kit doesn't work when built into executable.

Solved!
Go to solution

Really? NI's documentation actually suggested to "always include" the correct .lvclass (word, excel, etc..)in the project in the source files (2014 and later) but that doesn't seem to be correcting my issue... any other ideas?

 

*EDIT: I have tried to compile with and without manually including the NI_Word.lvclass

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O6PSAU&l=en-US

 

http://zone.ni.com/reference/en-XX/help/370274M-01/lvrgthelp/rgt_stand_alone_apps/

 

I have tried adding the Get ActiveX Reference (screenshot attached) with no change in function

 

Also, I am using 64 bit labview and windows 10, not sure if that comes in to play at all, and the error only occurs when compiled into an .EXE application, it runs fine in developer mode.

 

I created a simple generate report project that indexes through the steps for creating a static report and has all of my compile settings, attached to this post.

 

Thank you and I appreciate your help!

David

Download All
0 Kudos
Message 11 of 24
(1,409 Views)

Sorry, I can't open your files.  Can you back save to 2017?  

Try restarting LabVIEW.  I have seen it happen before where the dynamic VI's get messed up.  I can't remember the details or what caused it but restarting LabVIEW fixed the issue for me.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 12 of 24
(1,403 Views)

Hi Aputman,

Let me know if these files work. Note that part of the "Save Previous" operation added the Program Files(X86) folder, that is normally not part of the project.

 

I have tried resetting labview and my computer a couple of times. I have had that issue as well where resetting my computer solves quite a few issues for runtime!

 

Thanks

David

0 Kudos
Message 13 of 24
(1,395 Views)

David,

 

It looks like the linkage to the NI_Word.lvclass was saved in a strange way in your .lvproj somehow. When I look at your .lvproj file in a text editor, I see this line:

 

<Item Name="NI_Word.lvclass" Type="LVClass" URL="../../../../../../../Program Files (x86)/National Instruments/LabVIEW 2018/vi.lib/Utility/NIReport.llb/Word/NI_Word.lvclass"/>

 

I also received a load warning about the file location of the NI_Word.lvclass when I opened your project. So I removed NI_Word.lvclass from the project, then expanded 'Dependencies' and dragged NI_Word.lvclass from the dependencies up under My Computer next to Untitled 1.vi. When I then re-saved the project and looked at it in a text editor, I see this line:

 

<Item Name="NI_Word.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/Utility/NIReport.llb/Word/NI_Word.lvclass"/>

 

That's what I expect to see... a link to the class using the symbolic vi.lib path. At this point I built the EXE and it ran fine.

 

So in your project, you should remove NI_Word.lvclass from your source files, then drag the entry under Dependencies back to your source files. Then you'll need to re-add it as an Always Included file in your build spec. After that, hopefully your EXE should build and run fine.

0 Kudos
Message 14 of 24
(1,386 Views)

Hi Darren,

When I open the project in a text editor I see the same as you:

 

<Item Name="NI_Word.lvclass" Type="LVClass" URL="../../../../../../../Program Files (x86)/National Instruments/LabVIEW 2018/vi.lib/Utility/NIReport.llb/Word/NI_Word.lvclass"/>

 

But I am having trouble fixing it. I have removed and re-added the NI_Word.lvclass multiple times using the following methods

  • Using the right click the project and then adding via the project
  • Dragging from the C:\Program Files (x86)\National Instruments\LabVIEW 2018\vi.lib\Utility\NIReport.llb\Word folder in to the project
  • Remove all references from the VI. Add the "Get activeX Reference for word" (this will add it to the dependencies) then drag it up under the VI

and the problem seems to recur. I have also created a whole new project and VI (from scratch, no copy/paste) and it happens again. Can you give more specifics on how you were able to get the project to update that pathway? I even tried fixing it in the text editor but that ends up with a conflict anyways....I'm sure it is something simple that I am missing from staring at this problem for too long 😕

 

Thanks

David

Download All
0 Kudos
Message 15 of 24
(1,372 Views)

aputman_0-1598470005855.png

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 16 of 24
(1,360 Views)

Looking more closely at the code, none of this should be necessary. You have a call to the 'Word Get ActiveX References' VI, which means the NI_Word.lvclass is statically linked in your code, so it automatically gets pulled into the EXE. In fact, I created a new project in LabVIEW 2018 32-bit, put your Untitled 1.vi in it and nothing else, and built an EXE, and the EXE ran fine... no NI_Word.lvclass wrangling in the project required.

 

Assuming you're still in LabVIEW 2018, can you try building the EXE in the attached project and seeing if it runs? If it doesn't work, then there's something busted with the Report Gen VIs in your LabVIEW installation.

Message 17 of 24
(1,352 Views)

Hey Darren,

I still get the same error when I build and run the files you sent 😞 . I'm going to uninstall and re-install labview - I think you are right with something not being installed or seated right.

 

2020-08-26_16-19-11.png

 

I really appreciate the help

David

0 Kudos
Message 18 of 24
(1,343 Views)

No problem, David. We probably could have hacked a bit more at the files in vi.lib to figure out what was wrong, but it may be best just to repair or uninstall/reinstall LabVIEW. Keep me posted on how things go.

0 Kudos
Message 19 of 24
(1,340 Views)

Hey Darren,

I zipped up my original project as was and sent it to a colleague and asked them to compile for me. The application from that works on both my system and the deployment stations - it looks like I just need to do a re-install of my development system. Again - I really appreciate the help! (as does my wall which has several suspiciously head shaped dents in it 🙂 )

 

-David

Message 20 of 24
(1,317 Views)