LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation not Saving New File

Why does this code not save a new file to my desktop with the XY Plots included?

Screenshot 2025-09-23 121504.png

0 Kudos
Message 1 of 11
(328 Views)

We can't debug an image. Kindly please upload your code and save it as an earlier version like 2019 so that we can test it out and advise accordingly. 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 11
(296 Views)

Hi Ford,

 


@FordClark001 wrote:

Why does this code not save a new file to my desktop with the XY Plots included?


What is the exact problem?

  • Does the VI don't save any file at all?
  • Is the file not shown on your desktop?
  • Is the file created, but without the plots included?
  • Did you debug your VI and check for any errors before the file saving routine?

Generic remark: typically the path to the user desktop is "C:\users\USERNAME\Desktop". You use a different path…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 11
(280 Views)

The VI doesn't save a file at all, at least not one that I can find. I don't see any errors when running the VI. Computers in my organization save all desktop content to the onedrive as part of the desktop file path.

0 Kudos
Message 4 of 11
(266 Views)

General note (unsure if it will work with OneDrive):

 

There is a "Get system directory" function that you should try to use when possible instead of manually creating a file path via concatenating strings:

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/utility/sysdir-llb/get-system-direc...

 

It makes your code a lot more tolerant of changing operating systems and environments.

0 Kudos
Message 5 of 11
(237 Views)

Hi Ford,

 


@FordClark001 wrote:

The VI doesn't save a file at all, at least not one that I can find. I don't see any errors when running the VI. Computers in my organization save all desktop content to the onedrive as part of the desktop file path.


What happens when you use a different path, like C:\temp or your %localappdata% path?

(In general: any local path, where you have sufficient access rights and NO OneDrive interception…)

 

When you need more help with your VI then please attach a downconverted version. Most will say "LV2021 or older", I prefer LV2019.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(222 Views)

It doesn't save when I try the temporary folder on the C drive either. Attached is 2018 version of the sub vi.

0 Kudos
Message 7 of 11
(198 Views)

@FordClark001 wrote:

It doesn't save when I try the temporary folder on the C drive either. Attached is 2018 version of the sub vi.


I can say your VI works fine for me.

I had to provide a template excel file with three worksheets, some data and then it saved TestData.xlsm in C:\temp.

0 Kudos
Message 8 of 11
(194 Views)

Strange, there must be some sort of policy being enforced on my laptop that prevents labview from saving documents.

0 Kudos
Message 9 of 11
(186 Views)

A question to ask (or a test you can run) is whether the problem is "special" for the Report Generation Toolkit or it affect all File Writes in LabVIEW.  Can you, for example, write a "Hello, World" Text file that is saved on your Desktop?  saved in your "My Documents"?  I would expect "My Documents" to be "forced" onto One Drive, but am unsure about the Desktop.

 

Bob Schor

0 Kudos
Message 10 of 11
(138 Views)