NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

batch report in seperate folder

Solved!
Go to solution

Hi,

 

I have a requirement where all the Batch reports to be store in a seperate folder than the one where the UUT reports gets stored.

 

Can any one help out in this?

 

regads,

Ramjee V

0 Kudos
Message 1 of 5
(4,407 Views)

Ramjee -

 

What version of TestStand are you using?

Manooch H.
National Instruments
0 Kudos
Message 2 of 5
(4,395 Views)

Hi,

 

I am using TestStand 4.2.1.

 

Regards,

Ramjee V

0 Kudos
Message 3 of 5
(4,379 Views)

Hi,

 

You could try using Expressions to Customize Report File Paths.

 

Checkout the following link: http://zone.ni.com/reference/en-XX/help/370052H-01/tshelp/infotopics/42whatsnew/#expreports

 

the following is an extract from the above link:

 

Using Expressions to Customize Report File Paths
In addition to the existing options to customize reports, you can now use predefined macros and custom expressions on the Report File Pathname tab of the Report Options dialog box to specify the filename of reports and the directory in which TestStand stores reports. For example, you can use expressions to save reports in a directory that uses the sequence filename, save reports in different directories based on execution status, and generate report filenames that include the serial number, user name, or execution status. You can use expressions to replicate all existing report filename options.

Select Specify Report File Path by Expression in the File Name/Directory Options drop-down list in the Generate Report File Path section on the Report File Pathname tab of the Report Options dialog box to enter an expression in the Report File Path control. The following table lists common report options and the equivalent expression for the Sequential model using the client sequence file directory as the base directory.

Current Report Option Equivalent Expression
New UUT Report File for Each UUT  <ClientFileDir>\Report_<UUT>.<FileExtension>
Prefix Sequence File Name to Report File Name <ClientFileDir>\<ClientFileName>_Report.<FileExtension>
Add Date and Time to File Name <ClientFileDir>\Report_<FileDate><FileTime>.<FileExtension>
Force File Name to Be Unique <ClientFileDir>\Report_<Unique>.<FileExtension>
Client Sequence File Directory + Prefix Sequence File Name to Report File Name + New UUT Report File for Each UUT + Add Date and Time to File Name <ClientFileDir>\<ClientFileName>_Report_<UUT>_<FileDate><FileTime>.<FileExtension>

The following table lists example expressions for common tasks using the Sequential model.

Task Equivalent Expression
Save reports in a directory that uses the sequence filename C:\<ClientFileName>\Report.<FileExtension>  Note  TestStand overwrites existing files unless you use the <Unique> macro or enable the Append if File Already Exists option.
 
Save reports in different directories based on execution status C:\<ClientFileName>\<UUTStatus>\Report.<FileExtension>  Note  TestStand overwrites existing files unless you use the <Unique> macro or enable the Append if File Already Exists option.
 
Generate report filenames that include the UUT serial number C:\<ClientFileName>\Report_<UUT>.<FileExtension>
Generate report filenames that include the user name C:\<ClientFileName>\Report_<UserName>.<FileExtension>
Generate report filenames that include the execution status C:\<ClientFileName>\Report_<UUTStatus>.<FileExtension>

TestStand supports the following macros:

<Batch>—Batch serial number the user provides during execution. If the batch serial number is empty, TestStand uses the Empty_Batch_SerialNo resource string.
<ClientFileDir>—Directory that contains the client sequence file.
<ClientFileName>—Name of the client sequence file.
<Desktop>—Directory path of the desktop.
<FileExtension>—File format extension that corresponds to the report format you specify on the Contents tab of the Report Options dialog box.
<FileDate>—String that contains the date that TestStand when first writes the file to disk during execution.
<FileDay>—String that contains the numeric day (1 through 31) when TestStand first writes the file to disk during execution.
<FileMonth>—String that contains the numeric month (1 through 12) when TestStand first writes the file to disk during execution.
<FileTime>—String that contains the time when TestStand first writes the file to disk during execution.
<FileYear>—String that contains the year when TestStand first writes the file to disk during execution.
<PublicDocumentsDir>—Public documents directory.
<StationID>—Station ID during execution.
<TempDir>—Temporary directory.
<TestSocket>—Test socket number during execution. This value is always 0 for the Sequential model.
<TestStandExecutableDir>—Directory of the TestStand executable.
<TestStandPublicDir>—<TestStand Public> directory.
<Unique>—A unique numerical value if the path evaluated already exists on disk.
<UserDocumentsDir>—My Documents directory path during execution.
<UserName>—Username currently logged in during execution.
<UUT>—UUT serial number users specify during execution. If the serial number is empty, TestStand uses the Empty_UUT_SerialNo resource string.
<UUTStatus>—UUT status during execution.
Refer to Specifying Report File Paths by Expression for more information about each macro and about using expressions to specify the filename of reports.

 

 

 

Using <Batch> maybe what you are looking for.

 

There is probably an example in the TestStand\Examples folder on how to use these.

 

Regards

Ray Farmer

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 5
(4,369 Views)
Solution
Accepted by topic author ramjeev

Ramjee -

 

As Ray suggested, the easiest way to accomplish this task would be to take advantage of the Specify Reports by Expressions feature introduced in TestStand 4.2. To get you started, here are some steps to get you started.

 

The following steps will create a Batch Report and UUT Report directory in the same directory as your Client Sequence File:

 

1. Go to Configure»Report Options.

2. In the Report Options Dialog, navigate to the Report File Pathname tab.

3. In the Generate Report File Path section, select Specify Report File Path by Expression from the File Name/Directory Options combo-box.

4. The Report File Path (Batch Model) will determine the location of your UUT Report and the Batch File Path will determine the location of your Batch Report.

5. Set these two fields as displayed in the screenshot below.

 

 

BatchForum.png
 
 
Hope this helps. Ray - Thanks for finding and providing the necessary documentation. Your activity on the forums continues to be appreciated.

 

Manooch H.
National Instruments
Message 5 of 5
(4,357 Views)