LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exe file no printing

Solved!
Go to solution

Hi,

 

I am using the LabVIEW 2020 version and built a VI. 

 

In this VI (it works already) I am filling a template made with Word 2016 with the help of Bookmarks. In the next step I am printing it with "Microsoft Print to PDF".

 

I am using the "blocks" given by the "Report generation"-folder.

First step: "Create Report.vi", then "Append report text.vi" and the last one is "Print report.vi".

 

So, if i am running the VI everything is fine and a PDF is created correctly in the folder i wanted to.

 

But if I am creating an .exe file nothing happens. 

 

I tried it with the MSOffice Report, nothing happened.

I tried it without a template, nothing changed.

I tried it with the programming examples given by the Community, nothing changed.

 

Does anyone know how to handle this problem?

 

0 Kudos
Message 1 of 10
(2,125 Views)

Please share your VI so that we might be able to help better.

 

Possibly you have some file that you read/write/change that is present in your development VI folder, but once you build an exe it's no longer in the same folder and thus file is not found.

But this is only a long shot guess, based on similar forum posts.

0 Kudos
Message 2 of 10
(2,110 Views)

Sorry, here is my VI Programm.

0 Kudos
Message 3 of 10
(2,107 Views)

This is a truncated screenshot of code, not code...

 

Is the path at Create Report (the ...\Kopie_Vorlage_Bookmarks_2.dot) relative or absolute? If it's relative, is the template in the same folder as .exe file?

 

EDIT:

In the original post you say if you create an exe file "nothing happens". Does "nothing happens" include an error or does the code literally not run or something else?

0 Kudos
Message 4 of 10
(2,105 Views)

In addition to checking the path:

 

If You are having trouble when the executable is compiled, You can try remote debugging. Check out this article on how to do it: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHpiCAG

 

That way you can probe the error wire so see which part of the process failed.

0 Kudos
Message 5 of 10
(2,066 Views)

sounds like a dependency problem. 

try adding NI_Standard Report.lvclass & NI_Word.lvclass as Always Included in your build spec

 

if calling from teststand, try calling that EXE from a batch file as well... really annoying but thats what works

Sr Test Engineer at American Innovations - LabVIEW CLA - Kudo's are appreciated!!
0 Kudos
Message 6 of 10
(2,027 Views)

It is an absolute path.

 

It seems like there is a problem with the ending in the path with ...\NI_Word.lvclass.

I saw an error code when I clicked on the arrow to start the executable. It pops up and closes again nearly at the same time. Nothing happens after the error code closes itself.

 

I attached the error code.

0 Kudos
Message 7 of 10
(2,010 Views)

@bjoernde wrote:

It seems like there is a problem with the ending in the path with ...\NI_Word.lvclass.

 


(There is no problem with the path "end", it just shows you what folder it is searching)

 

This just means you did not include a required dependency as suggested above. I think there was a bug a few versions ago where certain dependencies from the report generation tools where not included automatically. What is your LabVIEW version?)

 

 

0 Kudos
Message 8 of 10
(2,004 Views)

Then I should insert anything into the folder I am using?

 

I am using the LabVIEW 2020 (32bit) version.

0 Kudos
Message 9 of 10
(1,998 Views)
Solution
Accepted by topic author bjoernde

No, if you look at the paths, these files are supposed to be inside the exe and not part of your accessible file system:

 

altenbach_0-1637171361589.png

 

 

In the build specifications, try to place these libraries into the "always include" box of the file selection (as already suggested by others).

 

 

0 Kudos
Message 10 of 10
(1,994 Views)