DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Export to PDF generates extra files

I am generating reports using:

 

Call Report.Sheets.ExportToPDF(FilePath & "\" & Data.Root.Name & ".pdf", FALSE)

 

 Reports generated are fine but I am getting:

1.JPG

Those files stay and don't delete themselves unless I go and do that manually.  One file per PDF generated to that folder.

 

Ides???

0 Kudos
Message 1 of 3
(2,273 Views)

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

0 Kudos
Message 2 of 3
(2,248 Views)

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

 

0 Kudos
Message 3 of 3
(2,224 Views)