11-29-2011 03:11 AM
Hi all
Somehow I can't get the report generation to work inside a builded .exe. During development in Labview it just works fine. I tried to include some things but still it does not work.
I added an attachment where you can see which blocks I'm using.
For your information: When I try to output the document in an executable nothing happens, no error but also no output... When I try to run the .VI it does work.
Hope someone can help me out.
Thanks in advantage.
11-30-2011 04:15 AM
Anyone?
11-30-2011 04:21 AM
Patrick,
Have a look at this:
http://digital.ni.com/public.nsf/allkb/8A0E6274D9BD7B1986256F62006AD402
Also the links at the bottom of the above page.
Hope this helps. I had to add most of the report generation toolkit libraries to finally get it to work!
regards,
aCe
11-30-2011 04:51 AM
I already did everthing that is mentioned over there. Included just all but still nothing happens
11-30-2011 05:54 AM - edited 11-30-2011 05:55 AM
Patrick,
Its strange that you dont get any error. I am assuming that you are running the executable on the development machine itself?
I have had to add the following explicitly (not in dependencies) to get my executable to work. Some of it may not be required but I was done experimenting!
Which version of labview are you using?
Also you could add a word bring to front vi just for debugging to check if the program is getting far at all or not.
aCe
11-30-2011 05:59 AM - edited 11-30-2011 06:03 AM
After including just ALL ni report stuff, also the excel library's etc. I get this error when I try to output the info:
Possible reason(s): LabVIEW: Library has errors. Fix the errors before attempting this operation. Complete call chain: Get LV Class Default Value.vi NI_report.lvclass:New Report.vi Output all simulation info.vi Ivette v2.vi LabVIEW attempted to load the class at this path: C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\Utility\NIReport.llb\Word\NI_Word.lvclass
It is stuck at the moment the program SHOULD open the word template. Thats how far I can check with debugging it by making things visible at certain points.
Edit:
Labview 2009
And yes: at the development machine itself 🙂
11-30-2011 06:02 AM
Please check your path in the .exe file.
You are using the "This .vi" path constand, witch is different in a build .exe file compared to the dev. system.
Make sure that it is not a path within the .exe file and that it is pointing to the right document.
11-30-2011 06:05 AM - edited 11-30-2011 06:14 AM
How to point it at the right path?
I'm now pointing at Rapport\template.doc and adding the position of the VI in front. I want to place the template in the main directory of the executable, but it should not be a problem to move that directory to another place without any problems.
Edit: you're right, the appended path is wrong: IVette.exe\Rapport\template.doc
How to do this the right way?
11-30-2011 06:16 AM
There are many ways to do it, I have used this in the past.
11-30-2011 06:28 AM
Used another way to obtain the path, so the path is right now, but still the same error.