LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Report to File.vi does not work when built into executable

Solved!
Go to solution

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

0 Kudos
Message 1 of 11
(4,714 Views)

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,

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 2 of 11
(4,704 Views)

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.

0 Kudos
Message 3 of 11
(4,700 Views)

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

0 Kudos
Message 4 of 11
(4,693 Views)

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,

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
0 Kudos
Message 5 of 11
(4,681 Views)

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

0 Kudos
Message 6 of 11
(4,677 Views)

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

0 Kudos
Message 7 of 11
(4,670 Views)

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. 

0 Kudos
Message 8 of 11
(4,665 Views)

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

0 Kudos
Message 9 of 11
(4,661 Views)
Solution
Accepted by topic author James_AC

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. Smiley Tongue

0 Kudos
Message 10 of 11
(4,657 Views)