From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation in Executables

Solved!
Go to solution

Using LabVIEW 2012 SP1, I created a vi that opens an Excel file and puts a string of data (time stamp and a data bit).  It iterates once a second and appends the file just fine on my laptop.  My problem is that when I create an executable, the Report Generation does work.  The while loop works fine collecting the data but Excel does not open.  Can someone tell me what the trick is?

 

Thanks,

Brad

0 Kudos
Message 1 of 19
(4,433 Views)

Pretty hard to say without seeing some of the project.  A couple of obvious things to check:

 

Are there relative paths to the report?

Does the target have the file to open?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 19
(4,419 Views)

Hi Brad,

 

I had a similar problem. The fix was to include "NIReport.llb" in the build.

The Report Generator uses dynamic calls to sub vis so they don't automatically get included as dependencies.

 

However, I seem to recall that errors were generated in my case which you did not mention seeing.

You might want to make sure error handling is working in your code.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 3 of 19
(4,406 Views)

As mentioned above you probably need to do something like this:

http://zone.ni.com/reference/en-XX/help/372120A-01/lvrgthelp/rgt_stand_alone_apps/

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 4 of 19
(4,380 Views)

In addition, it will not work without Excel being installed on the target computer.

0 Kudos
Message 5 of 19
(4,345 Views)

You are correct in that I did not have NIReport.llb in the build and I did not have an error out indicator.  I tried to ensure that the Report Generation was included in the build, enabled debugger and diplayed the error out indicator.  I still had the problem that excel did not open.  Here is the end of the error message:LabVIEW attempted to load the class at this path: ...\labvi3w\vi.lib\utility\NIReport.llb\Excel\NI_Excel.lvclass.   Somehow I am not completely getting everything into the build.

 

Thanks for your help.

0 Kudos
Message 6 of 19
(4,332 Views)

Thank you.

 

I can't seem to figure out how to get this into my build:

 

  • labview\vi.lib\Utility\NIReport.llb\Excel\NI_Excel.lvclass if the application uses Microsoft Excel.  (copied from the link you sent)
0 Kudos
Message 7 of 19
(4,331 Views)
Solution
Accepted by topic author Brad_Henry

You should be able to add it by right clicking on "My Computer" in the LabVIEW project and selecting "Add" » "File..."

In the window that pops up you should be able to navigate to your LabVIEW Installation folder to the Excel Class directed. An example of its path on my system for LabVIEW 2012 looks like this: (You will likely need to change this)

C:\Program Files\National Instruments\LabVIEW 2012\vi.lib\Utility\NIReport.llb\Excel\NI_Excel.lvclass

Once the class shows up in your project you should be able to add it to the "Always Included" section of the "Source Files" category in the build specification.

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 8 of 19
(4,324 Views)

That path is the same on my computer was successful in adding it to the build.  I emailed the files to a coworker and hopefully it worked.  It will let you know.

 

Thanks again.

0 Kudos
Message 9 of 19
(4,302 Views)

Hey guys, 

 

Did anything come off this issue? 

 

I am experienceing the same thing, but with word. 

I have the NiReport.llb, Dynamic Word vi, NI_Word.Lvclass, Utility folder, Word folder from LVclass - all of these things included in my build.
I also have the " Pass all command line arguments to application" checked too. 

 

My issue is a little different though, " The executable creates an empty word file and with no data in it. Which beats me. 

I have word installed in the target computer too. 

 

I have followed everything from NI database and i still have this issue. 

 

Can anyone share some insight into this issue please.

 

Thanks, 

RP.

0 Kudos
Message 10 of 19
(4,171 Views)