05-22-2014 10:12 AM
TS 2013: My goal is to change the report name with a value read my UUT. I've read several posts about doing this but don't understand. I've added the <UUT> macro in the report options dialog but am stuck at how to write to that value at run time. I use the Single Pass execution (Sequential mode).
"Determine Report File Path" is mentioned often (which I have not been able to locate) and a ReportOptions callback but I'm not familar with callbacks.
So could someone give a newb a hand and list a sequence of clicks and right clicks to get me going? 🙂 Thanks!
05-22-2014 11:03 AM
Pat,
I'm having a similar problem, posted here. Maybe someone can jump in and help us both out.
05-23-2014 06:01 PM
Hi Pat
You can modify the Report Options Callback in order to change its base name. To do this first go to the Sequence Pane, right click on it and select Sequence File Callbacks.
From the list that is displayed select Report Options, and then click on Add and Ok.
If you expand the Parameters in the Variables Pane, you can look for a parameter called Base Name. You can add a step to change that name with the UUT variable.
The call the Report Options as a subsequence in your main sequence.
Regards
05-24-2014 04:41 PM
Store the UUT info you need where you can get it later:
1) Open your sequence file. Select View>>Sequence File>>Variables
2) Right click on FileGlobals in the Variables pane. Select Insert File Global>>String. Type MyUUTInfo as the variable name.
3) Go to your MainSequence (or whereever). After the point where you determine the piece of data from your UUT that you want in the report name, insert a statement step. Set the statement to:
FileGlobal.MyUUTInfo = Locals.WhereeverMyUUTInfoIs
1) Select Edit >> Sequence File Callbacks...
2) Select GetReportFilePath in the list. Click Add. Click Edit.
3) Insert a statement step or call a code module to insert the value of FileGlobals.MyUUTInfo into the value of Parameters.ReportFilePath
05-27-2014 01:31 PM
James,
For what it's worth it appears that in the GetReportFilePath callback that setting the name or report filepath doesn't have any effect. Looks like the Report File path has already been opened / determined by the process model.
Chris,
I'm pretty sure that ReportOptions is called before the Main Sequence, so having to change the name of the report or the path of the report changed from something in the Main Sequence wouldn't work either.
05-27-2014 01:59 PM
Aaron,
My mistake. I should have read the help for that instead of assuming. Would be nice if that worked.... I'll submit a suggestion for that functionality.
- James
05-27-2014 02:01 PM
So...basically, I'm out of luck unless I want to customize the process model?
05-27-2014 02:52 PM
You could try assigning the updated path to RunState.Caller.Locals.ReportPath in GetReportFilePath instead of to Parameters.ReportFilePath.
However, this will only work if your other report settings don't conflict with having the path changed at this point, which would be most easily determined by testing it.
- James
05-27-2014 03:06 PM
Getting closer...
I can update RunState.Caller.Locals.ReportPath in GetReportFilePath and I see an HTML document in the desired path. However, I have a 0 byte html file in the directory that is configured via the Report Options (so in the same directory as the sequence file. I can write a VI to delete that file unless you know of a way around that.
05-27-2014 03:16 PM
Deleting it sounds reasonable.