02-25-2020 11:38 AM - edited 02-25-2020 11:40 AM
I am generating reports using:
Call Report.Sheets.ExportToPDF(FilePath & "\" & Data.Root.Name & ".pdf", FALSE)
Reports generated are fine but I am getting:
Those files stay and don't delete themselves unless I go and do that manually. One file per PDF generated to that folder.
Ides???
02-25-2020 03:10 PM
Hi gsklyr,
It looks like the first parameter being passed is experiencing string concatenation, either in the FilePath variable or in the Data.Root.Name. When the script stops running, what is the Root level name in the Data Portal? Does it match the first file in your screenshot or the last file in your screenshot?
Is there any code in this script that appends the FilePath variable with "FilePath = FilePath +" or "FilePath = FilePath &"?
Brad Turpin
Senior Technical Support Engineer
National Instruments
02-26-2020 09:41 AM
No Root name is fine, resulting pdf is fine and in the desired location. All other scripts produce pdfs normally without the extra files.
FilePath = FSO.GetFile(FileDlgFileName).ParentFolder.Path