04-12-2013 09:17 AM
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
Solved! Go to Solution.
04-15-2013 02:52 AM
HELP!
04-15-2013 11:49 AM
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.
04-16-2013 06:32 AM
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
05-30-2013 12:22 PM
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.
05-31-2013 02:46 AM
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!