From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Report.Save Methode, The Report have been saved in a new path, but why is the file empty?

Solved!
Go to solution

Hallo,

I have a problem to save the report file in a new path.

In my code I have used the Runstate.Report.Save(newpath, overwrite, 0) Methode to save the report.

 

And after the excution of the test, I can find the report file in the right place, but wenn I open it, it is empty, I mean, there is nothing in this report.

 

Anyone has a idee? Where is the problem?And what could I do?

 

Thanks!

Cabio

0 Kudos
Message 1 of 6
(3,973 Views)

HELP!

0 Kudos
Message 2 of 6
(3,953 Views)
Solution
Accepted by topic author Cabio

Hi Cabio,

 

Before addressing your specific question, I want to let you know that you can configure the report file path in the Report File pathname tab of the report options.  You can choose from a number of options, including specifying a custom expression for the report path.  This will allow you to customize where the report is saved with no code changes.

 

If this doesn't address your needs, the problem you are likely having is that you are accessing the report object before the report is actually generated.  To access the report object after it has been populated, override the ProcessCleanup callback, which executes after the report has been generated.  (for an example of overriding a callback, refer to the PreUUTCallback shipping example.

 

Note: if you are using TestStand 2012, this method will not work unless you configure the report generator to not use a new thread.  You can configure this option in the result processing dialog by selecting the Show More Options checkbox.  If you do want to use a new thread, you can access the report by modifying the AddUUTReportAndSave sequence in ReportGen_ATML.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 3 of 6
(3,937 Views)

Thanks AI.B!

Yes, you are right. I have saved the report file, but too early. I have used the ProcessCleanup callback. And it works. Very nice!

 

Thanks a lot!

Regards!

Cabio

0 Kudos
Message 4 of 6
(3,920 Views)

Hi Al,

I am having the same issue and I don't know how to resolve it. I have tried the step you suggested in this post but still could not resolve it. Please, can you help

 

Thanks,

 

Stan.

 

AddUUTReportAndSave Error.jpg

0 Kudos
Message 5 of 6
(3,838 Views)

HI Angel22,

you dont need the step AddUUTReportandSave.

Because TestStand would generate alway a Report. You need only set the file path.

 

So, you should add a "sequence file callback" - "ProcessCleanUp" in the Sequence window.

And than use the "Report.Save" Methode to set the "Report File Path".

 

It should work.

 

Regards!

0 Kudos
Message 6 of 6
(3,825 Views)