05-25-2011 12:14 PM
Hi,
When I use the NI_Report.lvclass:New Report.vi and NI_Report.lvclass:Save Report to File.vi, I can succesfully use this to create and excel spreadsheet whilst working in developer.
However when I build the source into an executable, this no longer works. (The filename is built into the source, so I am not using a dialogue box)
It can, however, build an .html file but this does not look as tidy. Why is it not creating the Excel file?
Currently running developer suite 2009, tried the .exe on Windows 7 and Windows XP with the same effect.
Thanks,
-
James
Solved! Go to Solution.
05-26-2011 07:33 AM
Hi James,
Thank you for posting onto the National Instruments forum, is there any chance you could try this on a simple Vi or just attach the VI you are using to this post? This way I can try to replicate it myself. It could just be a simple option that is being overlooked when building the executable.
Many Thanks,
05-26-2011 08:22 AM
While building executable have you included Excel Dynamic VI in your project file and in always included section while building your application ?
If you are using report generation tool kit you have to use Excle dynamic VI see the readme file.
05-26-2011 09:18 AM
Thanks John,
I've attached the .vi, I'm afraid its not commented yet and perhaps a few too many untidy wires but I hope you can follow it enough. On the left you can see the New Report.vi on the right Save Report to File.vi.
Works if I change the setting to HTML but not if I set it to Excel (and only not working in the .exe)
Thanks
-
James
05-27-2011 07:33 AM
Hi James,
Have you also taken into consideration systemcrash's advice? Is there anyway you could possibly send the project as you only sent the VI, it appears to be that you are missing some of the report generation toolkit's VI's.
By looking into context help (Ctrl-H) of the report functions you are using please ensure that the correct sub VI's are including into the executable.
Many Thanks,
05-27-2011 07:42 AM
Hi John,
I have looked in context help, there is nothing there to say what else I need to create. I cannot find the extra function suggested by SystemCrash.
There is no option I can see when creating the .exe build to add anything extra in, would it not be adding the correct things in anyway. I do not understand how anything can be missing when:
1. When I run it as a .vi it works perfectly fine - it will create the Excel files
2. When I build an .exe and run it on the same machine, it does not create the Excel files
3. If I change the report to create HTML it creates the file perfectly fine when running in the .vi and from the .exe build.
Best Regards,
-
James
05-27-2011 08:05 AM
Hi John,
I have attached the built .exe
If you simply run the .vi I attached earier, it should create a excel spreadsheet similar to the one attached in the directly \Calibration Report\
If you run the .exe it will create the folder \Calibration Report\ but not create the excel spreadsheet.
I'm afraid this does not make sense to me?
Thanks again,
-
James
05-27-2011 08:15 AM
Send us the image of how are you building the exe, specially source file page, I appreciate if you can down convert VI to 8.6 and send it across.
05-27-2011 08:27 AM
Hi SystemCrash,
I have downsaved it to 8.6, please find attached.
I have included the file structure so you can see it has created the spreadsheet. Perhaps the easiest thing is if you can try running it (should just chuck another file into the folder) then see if you can build an .exe and see if it works?
Not sure what you are looking for on that page you specified - I choose the .vi i want the program to start up with then all the other .vi's go into "Always Included", there are no other options available?
Best Regards,
-
james
05-27-2011 09:10 AM
See the attached zip file, it works for me here, see the jpeg images and build application accordingly and let us know. Haven't included exe file since file size is too big.