11-11-2021 04:24 AM
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?
Solved! Go to Solution.
11-11-2021 05:10 AM
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.
11-11-2021 05:24 AM
Sorry, here is my VI Programm.
11-11-2021 05:34 AM - edited 11-11-2021 05:36 AM
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?
11-11-2021 07:23 AM
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.
11-15-2021 11:24 AM
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
11-17-2021 10:59 AM
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.
11-17-2021 11:14 AM
@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?)
11-17-2021 11:43 AM
Then I should insert anything into the folder I am using?
I am using the LabVIEW 2020 (32bit) version.
11-17-2021 11:50 AM - edited 11-17-2021 12:08 PM
No, if you look at the paths, these files are supposed to be inside the exe and not part of your accessible file system:
In the build specifications, try to place these libraries into the "always include" box of the file selection (as already suggested by others).